Go

Install

golang.org/doc/install
goenv
bingo


On Mac

brew install goenv # seems outdated, no latest go versions listed

On Linux (Debian)

git clone https://github.com/syndbg/goenv.git ~/.goenv

cat <<EOF >> ~/.zshrc 
# goenv
export GOENV_ROOT="$HOME/.goenv"
export PATH="$PATH:$GOENV_ROOT/bin"
eval "$(goenv init -)"
export PATH="$PATH:$GOROOT/bin"
export PATH="$PATH:$GOPATH/bin"
EOF

source ~/.zshrc 

Configure a Go env

goenv install --list # list go versions
goenv install 1.17.0 # install a go version
goenv global 1.17.0 # set default global go version
goenv local 1.17.0 # set project version in .go-version file

Other useful goenv commands:

goenv version # show current go version
goenv versions # show installed go versions

Docs

Package registry