I’m trying out some Go examples and I started with a JSON parser and I wanted to add a dependency to a remote repository. I was under the assumption that the Go build process will pull the dependencies when I compile, but strangely it did not. Here is the error that I get!
main.go:8:9: cannot find package "github.com/spf13/viper" in any of:
/usr/local/Cellar/go/1.9.1/libexec/src/github.com/spf13/viper (from $GOROOT)
/Users/joe/Projects/Private/go-projects/src/github.com/spf13/viper (from $GOPATH)
Here is my import:
Any ideas as to what is wrong happening here? I have my GOPATH and GOROOT set up properly!