// install Brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
// install Goland
brew update&& brew install golang
mkdir -p $HOME/go/{bin,src,pkg}
// vim .zshrc
export GOPATH=$HOME/go
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
// GVM
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
gvm listall
gvm install go1.16.2
gvm use go1.16.2 [--default]
MAC Go 环境配置
3 min read