asdf Go
Manage Go version by asdf
kennyp/asdf-golang: golang plugin for asdf version manager https://github.com/asdf-vm/asdf
code:terminal
asdf plugin-add golang https://github.com/kennyp/asdf-golang.git
asdf list all golang
asdf install golang 1.17.6
asdf local golang 1.17.6 // .tool-version will be created
go install したあとは
$ asdf reshim golang
go.mod も使えるが、バージョンに注意が必要。.tool-versions 使う方がよいだろう
For example, a go 1.14 directive in a go.mod file will result in the highest installed 1.minor.patch being selected, not necessarily 1.14.patch.