Missing packages during build ...
Building via go build, receive the following errors:
main.go:4:2: cannot find package "github.com/boyter/scc/processor" **in** any of:
/usr/local/Cellar/go/1.10.2/libexec/src/github.com/boyter/scc/processor (from $GOROOT)
/Users/myuser/go/src/github.com/boyter/scc/processor (from $GOPATH)
main.go:5:2: cannot find package "github.com/urfave/cli" **in** any of:
/usr/local/Cellar/go/1.10.2/libexec/src/github.com/urfave/cli (from $GOROOT)
/Users/myuser/go/src/github.com/urfave/cli (from $GOPATH)
Problem is fixed by installing necessary dependencies (as indicated above) with:
go get github.com/boyter/scc/processor github.com/urfave/cli
Build then works. I'm considering this a workaround and only added this issue as documentation for others that may (will?) run into this.
OS: macOS Sierra (10.12.6) go version: go1.10.2 darwin/amd64
PS: new to Go, bear with me if this is implicit.
go get github.com/boyter/scc should get all dependencies.
Hi @psalvitti as @nemith mentioned everything should be there. I have confirmed this in another machine just in case I was wrong.
Its more likely you cloned into another directory not the GOPATH. A go get github.com/boyter/scc then navigate to $GOPATH/src/github.com/boyter/scc and run go build should work.
Feel free to reopen this if you are having issues, but see https://boyter.org/posts/how-to-start-go-project-2018/ if you need more help with GOPATH and the like.