GOROOT&GOPATH设置

GOROOT&GOPATH设置

vim ~/.bash_profile

export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=/golang/code 
export PATH=$PATH:$GOPATH/bin

source ~/.bash_profile
原文地址:https://www.cnblogs.com/shuchengyi/p/11406961.html