cannot download, $GOPATH not set. For more details see: go help gopath

在 ~/.bashrc 里加一下这两句
export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
原文地址:https://www.cnblogs.com/yaoshi/p/5763146.html