Last active
September 19, 2020 22:50
-
-
Save felipekm/ecf1a6c3e0b52132cd81b18fed337f01 to your computer and use it in GitHub Desktop.
Installing Go MacOSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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