Skip to content

Instantly share code, notes, and snippets.

@felipekm
Last active September 19, 2020 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipekm/ecf1a6c3e0b52132cd81b18fed337f01 to your computer and use it in GitHub Desktop.
Save felipekm/ecf1a6c3e0b52132cd81b18fed337f01 to your computer and use it in GitHub Desktop.
Installing Go MacOSX
#/bin/sh
# download gvm
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
# include in path (.bashrc, .zshrc)
export PATH=$PATH:$HOME/.gvm/bin
[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm"
export GOPATH=$HOME/Go
export GOROOT=/Users/{YOUR_USER}/.gvm/gos/go1.14.6
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
# gvm install version
gvm install go1.14.6 -B
# turns default
gvm use go1.14.16 --default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment