[email protected]:~$ vim .profile 

export GOROOT=/usr/local/go
export GOBIN=$GOROOT/bin
export GOPATH=$HOME/go-path
export GOPATHBIN=$GOPATH/bin

export PATH=$PATH:$GOBIN:$GOPATHBIN
来源:中战博客,欢迎分享!
标签: go,golang,path,gopath,gobin,profile