使用gvm在~/.bash_profile里面添加一下文本时GOROOT和GOPATH需要在之后设置才有效[估摸着是被覆盖了]
$ vim ~/.bash_profile
#[[ -s "/Users/zkb/.gvm/scripts/gvm" ]] && source "/Users/zkb/.gvm/scripts/gvm"
[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm"
export GOROOT=/usr/local/go
export GOPATH=/Users/zkb/workspaces/[github.com](http://github.com/)
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
修改之后执行下source, 即可生效
$ source ~/.bash_profile