前置条件
若已经安装go则卸载
安装
下载:github:https://github.com/voidint/g/releases
创建目录:D:\gvm
解压可执行文件到D:\gvm
设置环境变量
G_HOME=C:\Users\hww\.g
GOROOT=%G_HOME%\go
D:\gvm
%GOROOT%\bin
示例如下


基本使用
# 查询本地安装
g ls
# 查询可供安装的所有go版本
g ls-remote
# 查询当前可供安装的stable状态
g ls-remote stable
# 安装
g install 1.21
# 切换使用
g use 1.21
# 卸载
g uninstall 1.21
示例

网友评论