Install Go 1.18 and Go 1.21 side-by-side and switch between them per project with a single command.
Create a named package set for each project so installed Go packages stay isolated and don't conflict.
Bootstrap a Go installation from source on a machine that has no existing Go binary.
Building Go 1.5+ from source requires an existing Go installation, the README explains the bootstrapping sequence to install Go 1.4 first.
GVM is a command-line tool for installing and switching between multiple versions of Go on the same machine. It is written as a shell script and works on Linux, macOS, and FreeBSD. The main use case is letting developers keep several Go versions installed at once and switch between them on demand. You run a command like gvm install go1.20 to download and compile a specific version, then gvm use go1.20 to make that version active in the current shell. GVM sets the GOROOT and GOPATH environment variables automatically when you switch versions. A flag lets you set a default version so it activates in every new terminal session. The tool also manages package sets (pkgsets), which are isolated GOPATH environments. Each package set has its own set of installed Go packages, so you can keep dependencies for different projects separated. You can create, switch to, and delete named package sets without affecting other projects. One thing to know when installing newer Go versions from source: Go 1.5 and later removed the C compiler from their own build process and replaced it with a Go compiler, which means you need an existing working Go installation to compile them. The README explains the bootstrapping sequence, which typically involves installing Go 1.4 from a binary first, using it to build a newer version, and repeating as needed for the latest Go versions. Installation is a single curl command that downloads and runs the installer script. The command gvm implode removes gvm and all installed Go versions entirely. Mercurial and build tools like bison and gcc are required on the host machine before installing.
← moovweb on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.