Skip to main content
  1. Tutorial/

Go Version Manager (GVM)

88 words·1 min
Golang
Table of Contents

GVM(Go Version Manager)是一款用于管理和切换不同Go语言版本的工具

Install
#

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

source /root/.gvm/scripts/gvm

check version
#

gvm list

Install golang
#

#gvm install 
gvm install go1.22.2

error: Failed connect to go.googlesource.com:443; Operation now in progress while accessing https://go.googlesource.com/go/info/refs

modify

vim ~/.gvm/scripts/install

reset: GO_SOURCE_URL=https://github.com/golang/go
# gvm install go1.22.4

if erros occured :
cat /root/.gvm/logs/go-go1.22.4-compile.log. check errors
gvm install go1.20
gvm install go1.22.4
gvm use go1.22.4
gvm use go1.22.4 --default
# gvm list

gvm gos (installed)

   go1.18.10
   go1.20
   go1.20.6
=> go1.22.4
   system
   
# go version
go version go1.22.4 linux/amd64

Related

PTY Command Usage
110 words·1 min
Golang
PTY command usage # Go执行python脚本,异步读取输出,但是无法实时生成输出信息,有些许延迟
50 Shades of Go
11898 words·56 mins
Golang
50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs # Traps, Gotchas, and Common Mistakes # level: beginner In most other languages that use braces you get to choose where you place them.
内存对齐-fieldalignment
33 words·1 min
Golang
fieldalignment # Install
简单实现QPS计算
280 words·2 mins
Golang
Simple QPS # 实现一个简单的QPS(每秒查询率)测试。
数据结构&控制结构实现原理
564 words·3 mins
Golang
Map 扩容条件与操作原理 # 负载因子 > 6.