Go Version Manager
# Ensure GVM_VERSION is set as above
GVM_PLATFORM=linux_amd64 # also supported: linux_arm64, darwin_amd64, darwin_arm64
curl -L https://github.com/periky/gvm/releases/download/${GVM_VERSION}/gvm_${GVM_PLATFORMPLA} -o ./gvm
chmod +x ./gvm
export GOROOT=$HOME/.gvm/go
export PATH=$PATH:$GOROOT/bin:$HOME/go/bin
# 命令行补全[可选]
## gvm completion -h
source <(gvm completion zsh)
./gvm list
./gvm list --remote
# 安装golang 1.20.4
./gvm install -v 1.20.4
# use命令支持参数补全
./gvm use 1.20.4
# uninstall命令支持参数补全
./gvm uninstall 1.20.4