Gobrew makes it easy to manage multiple versions of Go.
- Canonical way is by installing other versions of go via
go install golang.org/dl/go<version> - This method does not replace system
gocommand but instead adds a new command with the version appended (e.g.,go1.17.1) - Installed by piping a shell script into bash
- Doesn’t seem to be available via Homebrew
Usage
gobrew use <version>- Changegoto run the specified version. If the version is not installed, gobrew will download and install it.gobrew use latest- Changegoto run the latest available version of Go.