Go to file
Jake Romer 337e60ef60
Check env var for default package list (#59)
Source the default package list from the env var `$ASDF_GOLANG_DEFAULT_PACKAGES_FILE`, defaulting to `${HOME}/.default-golang-pks` if the former is not set.
2021-08-25 20:37:15 -04:00
.github/ISSUE_TEMPLATE Update issue templates 2019-03-02 03:03:39 -05:00
bin Check env var for default package list (#59) 2021-08-25 20:37:15 -04:00
lib Add help texts per plugin guidelins. (#46) 2021-01-04 19:19:48 -05:00
.gitignore Extract version from go.mod files (#32) 2020-06-16 18:08:17 -04:00
.travis.yml Add bin/download per latest asdf guidelines (#45) 2021-01-04 17:36:54 -05:00
LICENSE Initial Commit 2016-02-29 02:23:40 -05:00
README.md Use highest matching minor version from go.mod (#50) 2021-06-16 08:04:20 -04:00

asdf-golang

Build Status

golang plugin for asdf version manager

Requirements

MacOS

Linux (Debian)

Install

asdf plugin-add golang https://github.com/kennyp/asdf-golang.git

Use

Check the asdf readme for instructions on how to install & manage versions of go.

When using go get

After using go get to install a package you need to run asdf reshim golang to get any new shims.

Default go get packages

asdf-golang can automatically install a default set of packages with go get -u $PACKAGE right 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

Version selection

When using .tool-versions or .go-version, the exact version specified in the file will be selected.

When using 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.14 directive in a go.mod file will result in the highest installed 1.minor.patch being selected, not necessarily 1.14.patch.

Contributing

Feel free to create an issue or pull request if you find a bug.

Issues

  • Assumes Linux, FreeBSD, or Mac
  • Assumes x86_64, i386, i686, armv6l, armv7l, arm64 and ppc64le

License

MIT License