Skip to content

Instantly share code, notes, and snippets.

@MokkeMeguru
Created May 25, 2021 04:25
Show Gist options
  • Save MokkeMeguru/f1306768fc93da8a70d30e9c47c317f2 to your computer and use it in GitHub Desktop.
Save MokkeMeguru/f1306768fc93da8a70d30e9c47c317f2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
echo $(which go)
git clone https://github.com/syndbg/goenv.git ~/.goenv
echo 'export GOENV_ROOT="$HOME/.goenv"' >>~/.bash_profile
echo 'export PATH="$GOENV_ROOT/bin:$PATH"' >>~/.bash_profile
echo 'eval "$(goenv init -)"' >>~/.bash_profile
. ~/.bash_profile
goenv install 1.16.3
echo 'export PATH="$GOROOT/bin:$PATH"' >>~/.bash_profile
echo 'export PATH="$PATH:$GOPATH/bin"' >>~/.bash_profile
. ~/.bash_profile
goenv global 1.16.3
echo $(which go)
go version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment