mac开发机下go语言环境安装
- homebrew安装
brew update && brew upgradebrew install mercurialbrew install go
- 环境变量配置
为了让自己的程序编译之后在命令行任何地方能直接执行,再加入GOPATH下的bin
$vim ~/.bash_profile#GOPATHexport GOPATH=$HOME/Documents/go_workspace#GOPATH binexport PATH=$PATH:$GOPATH/bin$source .bash_profile