Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jfelipearaujo/gvm


https://github.com/jfelipearaujo/gvm

Last synced: 6 days ago
JSON representation

Awesome Lists containing this project

README

        

# GVM - Go Version Manager

This application can manage multiple golang installations.

If you already have Go installed, just run the command bellow:

```
go install github.com/jfelipearaujo/gvm@latest
```

Make sure that your GOPATH/bin it's defined into yout PATH environment variable.

Feel free to contribute if you want.

## How to use:

Before anything else, you must download the correct version (x64/x86) for your system, see the [release](https://github.com/jfelipearaujo/gvm/releases) page.

Download the zip file, extract all the content in some folder.

Example:

```
# on Windows
C:\Users\{userName}\.gvm\bin\
```

When finished, add the installation path into your PATH environment variable.

If all goes well, open a new prompt and type the command below:

```
gvm
```

You should see the following output:

```
Usage: gvm

A Go Lang Version Manager

Flags:
-h, --help Show context-sensitive help.
--version Print version information and quit

Commands:
go-path Set the GOPATH environment variable
install Install (or reinstall) a valid version of Go Lang
list List installed all versions of Go Lang
uninstall Uninstall a version of Go Lang
use Use an installed version of Go Lang

Run "gvm --help" for more information on a command.

gvm: error: expected one of "go-path", "install", "list", "uninstall", "use"
exit status 1
```

## Install a version

```
gvm install
```

## Uninstall a version

```
gvm uninstall
```

## List all versions

```
gvm list
```

## Use a version

```
gvm use
```

## Setup GOPATH environment variable

This will define the GOPATH as the default one (C:\\{userName}\\go)

```
gvm go-path
```

Or

```
gvm go-path "C:\MyFolder\go"
```

If the selected folder does not have the necessary sub-folders (bin, pkg and src) they will be created.