go 升级到1.16
golang 多个版本管理 下载页面 多个版本管理 1.下载go1.16 ➜ bin pwd /Users/xxxx/go-dev/bin ➜ bin go get golang.org/dl/go1.15.8 go: finding golang.org/dl latest ➜ bin ll total 28816 -rwxr-xr-x 1 xxxxx staff 7.0M 2 20 18:33 go1.15.8 -rwxr-xr-x 1 xxxxx staff 7.0M 2 20 18:31 go1.16 确保可执行路径已经添加到PATH中. # go export GOPATH="${HOME}/go-dev" # GOROOT是GO的安装路径 export GOROOT="$(brew --prefix golang)/libexec" export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin" 新开终端/或者重新激活一下zshrc 2.下载go1.16 同时配置go1.16 env GOROOT ➜ ~ go1.16 go1.16: not downloaded. Run 'go1.16 download' to install to /Users/xxxxxx/sdk/go1.16 ➜ ~ go1.16 download ➜ ~