https://github.com/devnw/gvm
Go Version Manager (gvm) enables seamless installing and swapping between Go versions with a single command. This tool manages a Go environment for the user by allowing a user to specify which Go version they wish to use and handling all of the steps to install and configure that Go version. GVM also supports installing Go from the official Golang master branch so that you can easily try the next version of Go without waiting for a pre release build.
https://github.com/devnw/gvm
go go-installer golang google-go google-golang gvm installer package-manager version-manager
Last synced: 5 days ago
JSON representation
Go Version Manager (gvm) enables seamless installing and swapping between Go versions with a single command. This tool manages a Go environment for the user by allowing a user to specify which Go version they wish to use and handling all of the steps to install and configure that Go version. GVM also supports installing Go from the official Golang master branch so that you can easily try the next version of Go without waiting for a pre release build.
- Host: GitHub
- URL: https://github.com/devnw/gvm
- Owner: devnw
- License: apache-2.0
- Created: 2021-12-13T10:51:20.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-31T15:31:31.000Z (over 2 years ago)
- Last Synced: 2024-06-20T17:48:20.576Z (over 1 year ago)
- Topics: go, go-installer, golang, google-go, google-golang, gvm, installer, package-manager, version-manager
- Language: Shell
- Homepage:
- Size: 133 KB
- Stars: 55
- Watchers: 1
- Forks: 4
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# gvm
Go Version Manager
[](https://github.com/devnw/gvm/actions/workflows/lint.yml)
[](https://opensource.org/licenses/Apache-2.0)
[](http://makeapullrequest.com)
## Install
```bash
curl -o- https://raw.githubusercontent.com/devnw/gvm/main/install.sh | bash
```
```bash
wget -qO- https://raw.githubusercontent.com/devnw/gvm/main/install.sh | bash
```
## Updating gvm
`gvm` will automatically detect if there is a newer version available for the
installed `gvm` tag and give the user the option to update (**NOTE** This does
NOT work for semver tags). If the user chooses to update, the `gvm` command will
be updated to the latest version and re-run the updated script instead.
## Usage
`gvm [arguments]`
### Available Commands
`` Install or Change Specific Go Version
* `-s` Silent Mode (No Prompts)
* `-r` Remove Go Version
`ls` List Installed Go Versions
`clean` Remove inactive Go Versions
`-h` | `--help` | `help` Print this help text
## Installation Example
To install a released version of `Go` use the following command.
```bash
gvm 1.17.5
```
If this version of Go has been previously installed, the
link will be updated activating that version. If the version
is not installed however `gvm` will install it, then link it.
To remove a version
```bash
gvm 1.17.5 -r
```
### Development Version
`gvm` supports installing the current development version of `Go`
To install the current development version of `Go` use the following command.
```bash
gvm next
```
**NOTE:** If you have previously installed the development version of `Go` you
**must** pass the `--update` flag if you want to build the latest development
version, otherwise it will keep using the previously compiled development
version.
## How it works
`gvm` creates a directory at `$HOME/.gvm` and stores all of the Go versions in
it. It then creates a symlink to the currently active version at `$HOME/.gvm/go`
which is then added to the beginning of the PATH.
## Supported OSes and Architectures
* Linux (ARM64 / AMD64)
* Mac OS X (ARM64 / AMD64)
* FreeBSD (ARM64 / AMD64)