[go] 使用 gvm 管理 go 版本

Date Category go

gvm 是个 go 版本管理工具。 可以让多个版本的 go 编译器在同一台机器上共存,并可以方便的切换要使用的 go 版本。

安装

安装依赖:

$ sudo apt-get install curl git mercurial make binutils bison gcc build-essential

安装 gvm:

$ bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)

如果上面的脚本提示 git clone 错误的话,可以通过下面的方式解决:

$ wget https://raw.githubusercontent ...
more ...