Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yakiyo/gon
Fast and simple version manager for the Go compiler, written in Go.
https://github.com/yakiyo/gon
go go-version-manager golang gvm nvm version-manager
Last synced: 6 days ago
JSON representation
Fast and simple version manager for the Go compiler, written in Go.
- Host: GitHub
- URL: https://github.com/yakiyo/gon
- Owner: Yakiyo
- License: mit
- Created: 2023-09-05T15:29:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-29T05:57:23.000Z (about 1 year ago)
- Last Synced: 2024-06-21T18:53:45.739Z (5 months ago)
- Topics: go, go-version-manager, golang, gvm, nvm, version-manager
- Language: Go
- Homepage:
- Size: 130 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gon
Fast and simple version manager for the [Go](https://go.dev) compiler, written in Go, inspired from [nvm](https://github.com/nvm-sh/nvm).
## Installation
### Scoop (windows)
```
$ scoop install https://github.com/Yakiyo/gon/raw/main/share/scoop/gon.json
```### Brew
Theres a brew formula at [share/brew](./share/brew/gon.rb)*More installation methods TBA*
## Setup
For using the Go compiler installed by gon, you need to add the downloaded path to your `PATH` environment variable. This can be manually added to the sys path/user path, or be automated in your shell's init script.For example, in case of bash, add the following line to your `~/.bashrc`
```sh
export PATH="$(gon path bin)":$PATH
```
This works the same for zsh too.For powershell, the following can be added to `profile.ps1`
```powershell
$Dir = gon path bin
$User = [System.EnvironmentVariableTarget]::User
$Path = [System.Environment]::GetEnvironmentVariable('Path', $User)
if (!(";${Path};".ToLower() -like "*;${Dir};*".ToLower())) {
[System.Environment]::SetEnvironmentVariable('Path', "${Path};${InstallDir}", $User)
$Env:Path += ";${Dir}"
}
```## Usage
For installing a specific version, use the `gon install` command.
```sh
$ gon install latest # install latest Go version$ gon install v1.20 # install specific version, the `v` suffix is optional
$ gon install # install the version mentioned in `./go.mod`
```For uninstalling, the specific version must be mentioned
```sh
$ gon uninstall 1.20
```
Aliases can be added and removed via the `gon alias` and `gon unalias` commands.For using an installed version, run
```sh
$ gon use v1.20 # use specific version$ gon use # use version mentioned in `./go.mod`
```The name gon comes from the character [Gon Freecss](https://anilist.co/character/30/Gon-Freecss) from [Hunter X Hunter](https://anilist.co/anime/11061/Hunter-x-Hunter-2011/)
## Author**gon** © [Yakiyo](https://github.com/Yakiyo). Authored and maintained by Yakiyo.
Released under [MIT](https://opensource.org/licenses/MIT) License
If you like this project, consider leaving a star ⭐ and sharing it with your friends and colleagues.