golang plugin for asdf version manager https://github.com/asdf-vm/asdf
golang plugin for asdf version manager
brew install coreutils
asdf plugin-add golang https://github.com/kennyp/asdf-golang.git
Check the asdf readme for instructions on how to install & manage versions of go.
go getto install a package you need to run
asdf reshim golangto get any new shims.
asdf-golang can automatically install a default set of packages with
go get -u $PACKAGEright after installing a new Go version. To enable this feature, provide a \$HOME/.default-golang-pkgs file that lists one package per line, for example:
// allows comments github.com/Dreamacro/clash github.com/jesseduffield/lazygit
You can specify a non-default location of this file by setting a
.go-version, the exact version specified in the file will be selected.
go.mod, the highest compatible version that is currently installed will be selected. As per the Go modules reference, that is the highest minor version with a matching major version. For example, a
go 1.14directive in a
go.modfile will result in the highest installed
1.minor.patchbeing selected, not necessarily
Feel free to create an issue or pull request if you find a bug.