tedshd's DevNote

Develop & Design Note by Ted

Your posts match “ golang ” tag:

Golang - gvm Golang version manger

gvm

Intro

gvm

Golang version manger

Usage

  1. Install

    bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
    
  2. Add to .bashrc or .zshrc

    # added gvm command to shell
    
    source "$HOME/.gvm/scripts/gvm"
    # directory path for GO
    
    export GOPATH=$HOME/gopath
    export GOROOT=$HOME/go
    export PATH=$PATH:$GOROOT/bin
    
  3. Install go

    gvm install go1.4 -B
    gvm use go1.4
    export GOROOT_BOOTSTRAP=$GOROOT
    gvm install go1.9
    
  4. Finall add command to .bashrc or .zshrc

    gvm use go1.9
    

Refer - Go - 在 OSX 安裝 GVM