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 go command 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>- Change go to run the specified version. If the version is not installed, gobrew will download and install it.
  • gobrew use latest- Change go to run the latest available version of Go.