If one's working directory contains src, pkg and bin, then activating the environment won't correctly set the $GOPATH.
The solution I found was to edit goenv/activate and change the beginning of the export GOPATH line to be "export GOPATH=$GOPATH:pwd:...", such as the following:
If one's working directory contains
src
,pkg
andbin
, then activating the environment won't correctly set the$GOPATH
.The solution I found was to edit
goenv/activate
and change the beginning of theexport GOPATH
line to be "export GOPATH=$GOPATH:pwd
:...", such as the following:Important note: I'm new to Go, so maybe do I have my project structure wrong, or plenty of other stuff wrong. If so, please let me know!
Example tree: