I wrote an extension to gb (the go build tool released by Dave Cheney) that uses gb's functionality to determine the $GOPATH where it operates, plus an alias gbpath="eval `gb gopath`", so a simple gbpath sets the right $GOPATH no matter where I am in the filesystem. I should probably release that at some point.