I’ll introduce how to install and manage multiple versions of Go using the asdf plugin asdf-golang.
Background: Managing Go Versions with asdf
I needed to install Go on M1 macOS, and decided to use asdf-golang with multiple version management in mind.
Prerequisites: Install asdf
First, complete asdf のインストール [M1 macOS 編] (Installing asdf [M1 macOS Edition]).
Installing the asdf-golang Plugin
You need to install coreutils as a prerequisite.
brew install coreutils
asdf plugin-add golang https://github.com/kennyp/asdf-golang.git
List of Go Versions Available for Installation with asdf-golang
asdf list-all golang
Install Go with asdf
asdf install golang latest
asdf list golang
1.19.4
That’s all from the Gemba.