HOW TO : Set $GOPATH

Been dabbling in go recently and I was surprised that the default install doesn’t setup the $GOPATH environment variable.

If you are running it on a Linux box, here is how your can set the $GOPATH variable

Add the following lines to ~/.bashrc file 

export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin