I prefer a GOPATH per project but never worry about setting it. I have a small bash/dash script called gp which finds the GOPATH for me as long as I'm in the project somewhere:
#!/bin/dash paths=${PWD} while [ "$paths" != "/" ]; do if [ -d "$paths/bin" ]; then if [ -d "$paths/pkg" ]; then if [ -d "$paths/src" ]; then echo ${paths} exit 0 fi fi fi cd .. paths=${PWD} done exit 1 Then in my .bashrc I have an alias for GO - so normal go command is available still: > > alias GO='GOPATH=`gp` go $*' Then from anywhere from within the project I can do things like GO install ./... and never worry about GOPATH again :) Regards, Diddymus -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.