Git Product home page Git Product logo

gvm's Introduction

gvm

gvm is a Go version manager. gvm installs a Go version and prints the commands to configure your environment to use it. gvm can install Go binary versions from https://storage.googleapis.com/golang or build it from source. Below are examples for common shells.

bash:

eval "$(gvm 1.22.3)"

cmd.exe (for batch scripts %i should be substituted with %%i):

FOR /f "tokens=*" %i IN ('"gvm.exe" 1.22.3') DO %i

powershell:

gvm --format=powershell 1.22.3 | Invoke-Expression

gvm flags can be set via environment variables by setting GVM_<flag>. For example --http-timeout can be set via GVM_HTTP_TIMEOUT=10m.

Installation

You can download a binary release of gvm for your specific platform from the releases page. Then just put the binary in your PATH and mark it as executable (chmod +x gvm).

You must adjust the version and platform info in URLs accordingly.

Linux (amd64):

# Linux Example (assumes ~/bin is in PATH).
curl -sL -o ~/bin/gvm https://github.com/andrewkroh/gvm/releases/download/v0.5.2/gvm-linux-amd64
chmod +x ~/bin/gvm
eval "$(gvm 1.22.3)"
go version

Linux (arm64):

# Linux Example (assumes ~/bin is in PATH).
curl -sL -o ~/bin/gvm https://github.com/andrewkroh/gvm/releases/download/v0.5.2/gvm-linux-arm64
chmod +x ~/bin/gvm
eval "$(gvm 1.22.3)"
go version

macOS (universal):

# macOS Example
curl -sL -o /usr/local/bin/gvm https://github.com/andrewkroh/gvm/releases/download/v0.5.2/gvm-darwin-all
chmod +x /usr/local/bin/gvm
eval "$(gvm 1.22.3)"
go version

Windows (PowerShell):

[Net.ServicePointManager]::SecurityProtocol = "tls12"
Invoke-WebRequest -URI https://github.com/andrewkroh/gvm/releases/download/v0.5.2/gvm-windows-amd64.exe -Outfile C:\Windows\System32\gvm.exe
gvm --format=powershell 1.22.3 | Invoke-Expression
go version

Fish Shell:

Use gvm with fish shell by executing gvm 1.22.3 | source in lieu of using eval.

For existing Go users:

go install github.com/andrewkroh/gvm/cmd/[email protected]

gvm's People

Contributors

andrewkroh avatar dependabot[bot] avatar graphaelli avatar andrewvc avatar dliappis avatar keetraxx avatar ph avatar watson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.