Setup:
Have a look at my configuration:
$ echo $GOPATH && ls -r $GOPATH
/home/cyrus/.go
src pkg bin
$ echo $GOROOT && ls $GOROOT
/usr/local/go
api AUTHORS bin CONTRIBUTORS doc favicon.ico include lib LICENSE misc PATENTS pkg README robots.txt src test VERSION
You can see that I've set a path for $GOPATH
. In addition, I've created subdirectories that I may not need.
Question:
Why does the following command generate this error message?
$ go get code.google.com/p/go-tour/gotour
package code.google.com/p/go-tour/gotour: cannot download, $GOPATH not set. For more details see: go help gopath