My $GOPATH is in a standard place: $HOME/.local/share/go (aka $XDG_DATA_HOME/go) and all my projects (whatever language it is) live in $HOME/dev.
I use github for all my projects, so the public path for my go projects would be $GOPATH/src/github.com/rakoo/petproject. So all I have to do is
$ cd $GOPATH/src/github.com/rakoo $ ln -s ~/dev/petproject petproject
You do have to do this once for each project you start, but that should scale quite well.
TL;DR: Your projects don't need to be in $GOPATH; they only need to be accessible from $GOPATH
My $GOPATH is in a standard place: $HOME/.local/share/go (aka $XDG_DATA_HOME/go) and all my projects (whatever language it is) live in $HOME/dev.
I use github for all my projects, so the public path for my go projects would be $GOPATH/src/github.com/rakoo/petproject. So all I have to do is
and everything works flawlessly. I get to keep using my ~/dev dir for all my projects, and the Go environment is well defined and works as expected.You do have to do this once for each project you start, but that should scale quite well.
TL;DR: Your projects don't need to be in $GOPATH; they only need to be accessible from $GOPATH