Closed turtlemonvh closed 4 years ago
I see similar issues when using lines from the build-all.sh
script
is-mbp-timothy4:tmp timothy$ cd /Users/timothy/go/src/github.com/DarthSim/hivemind/
is-mbp-timothy4:hivemind timothy$ version=$(/bin/sh -c 'git describe --always --tags --abbrev=0')
is-mbp-timothy4:hivemind timothy$ echo $version
v1.0.6
is-mbp-timothy4:hivemind timothy$ env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w -X main.version=$version" -a -installsuffix cgo -o dist/hivemind .
# github.com/DarthSim/hivemind
./main.go:26:5: app.Author undefined (type *cli.App has no field or method Author)
./main.go:27:5: app.Email undefined (type *cli.App has no field or method Email)
./main.go:33:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in array or slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
./main.go:33:36: unknown field 'EnvVar' in struct literal of type cli.StringFlag
./main.go:34:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in array or slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
./main.go:34:40: unknown field 'EnvVar' in struct literal of type cli.StringFlag
./main.go:35:14: cannot use cli.IntFlag literal (type cli.IntFlag) as type cli.Flag in array or slice literal:
cli.IntFlag does not implement cli.Flag (Apply method has pointer receiver)
./main.go:35:32: unknown field 'EnvVar' in struct literal of type cli.IntFlag
./main.go:36:14: cannot use cli.IntFlag literal (type cli.IntFlag) as type cli.Flag in array or slice literal:
cli.IntFlag does not implement cli.Flag (Apply method has pointer receiver)
./main.go:36:37: unknown field 'EnvVar' in struct literal of type cli.IntFlag
./main.go:36:14: too many errors
It looks like this is because of the cli lib and version locking.
Since the application requires specific versions of deps to work, it may be best to remove the lines about being able to build with go get
from the README.
Could also be fixed by following suggestions in https://github.com/DarthSim/hivemind/issues/2 to document vendoring workflow.
FYI I downloaded the latest binary release and that does work fine, so this certainly looks to be just a build issue. :)
Does GO111MODULE=on go get -u github.com/DarthSim/hivemind
work for you?
Thanks for checking in on this.
Using GO111MODULE=on
gets further on mac.
is-mbp-timothy4:tmp timothy$ cd $GOPATH
is-mbp-timothy4:go timothy$ GO111MODULE=on go get -u github.com/DarthSim/hivemind
go: finding github.com/DarthSim/hivemind v1.0.6
go: downloading github.com/DarthSim/hivemind v1.0.6
go: extracting github.com/DarthSim/hivemind v1.0.6
go: finding github.com/pkg/term/termios latest
go: finding github.com/joho/godotenv/autoload latest
go: finding github.com/joho/godotenv v1.3.0
go: finding github.com/pkg/term latest
go: downloading github.com/pkg/term v0.0.0-20190109203006-aa71e9d9e942
go: finding gopkg.in/urfave/cli.v1 v1.22.2
go: downloading github.com/joho/godotenv v1.3.0
go: extracting github.com/pkg/term v0.0.0-20190109203006-aa71e9d9e942
go: extracting github.com/joho/godotenv v1.3.0
go: downloading gopkg.in/urfave/cli.v1 v1.22.2
build github.com/DarthSim/hivemind: cannot load gopkg.in/urfave/cli.v1: cannot find module providing package gopkg.in/urfave/cli.v1
This is what the pkg dir looks like, if that helps.
is-mbp-timothy4:go timothy$ tree -L 2 pkg/mod/github.com/
pkg/mod/github.com/
├── !darth!sim
│ └── hivemind@v1.0.6
├── joho
│ └── godotenv@v1.3.0
├── karrick
│ └── godirwalk@v1.12.0
├── keegancsmith
│ └── rpc@v1.1.0
├── mdempsky
│ └── gocode@v0.0.0-20190203001940-7fb65232883f
├── pkg
│ ├── errors@v0.8.1
│ └── term@v0.0.0-20190109203006-aa71e9d9e942
├── ramya-rao-a
│ └── go-outline@v0.0.0-20181122025142-7182a932836a
├── rogpeppe
│ └── godef@v1.1.1
├── sqs
│ └── goreturns@v0.0.0-20181028201513-538ac6014518
├── stamblerre
│ └── gocode@v0.0.0-20190327203809-810592086997
└── uudashr
└── gopkgs@v2.0.1+incompatible
23 directories, 0 files
Thanks! I updated the README
With go 1.13 on Centos 7
With go 1.12 on osx