golang version manage
docker run -it jaronnie/gvm:latest bash
# docker run -it jaronnie/gvm:latest-arm64 bash
gvm install go1.20
gvm activate go1.20
go install github.com/jaronnie/gvm@latest
curl -L -o gvm.tar.gz https://github.com/jaronnie/gvm/releases/download/v1.6.0/gvm_1.6.0_Linux_x86_64.tar.gz
gvm init
# gvm init <shellType>
zsh:
# echo "autoload -U compinit; compinit" >> ~/.zshrc
gvm completion zsh > "${fpath[1]}/_gvm"
linux bash:
gvm completion bash > /etc/bash_completion.d/gvm
# will install go 1.18
gvm install go1.18
# will install go 1.18.5 version
gvm install go1.18.5
# install offline, default package file path is ~/gvm
gvm install go1.18.5 --offline
# install offline, package file path is .
gvm install go1.18.5 --offline -p .
# list local go
gvm list
# list remote go
gvm list --remote
# list remote go with limit number
gvm list --remote -n 100
# list all
gvm list --remote --all
# will activate go 1.18 environment
gvm activate go1.18
gvm uninstall go1.18.5
gvm config --registry https://mirrors.aliyun.com/golang
# centos
yum -y install bash-completion
# gvm init <shellType>
gvm init bash
gvm completion bash | sudo tee /etc/bash_completion.d/gvm > /dev/null
- support windows