Skip to content

Instantly share code, notes, and snippets.

@saggie
Created November 8, 2022 10:08
Show Gist options
  • Save saggie/19ba6822135bac7498d22b59fdb2f899 to your computer and use it in GitHub Desktop.
Save saggie/19ba6822135bac7498d22b59fdb2f899 to your computer and use it in GitHub Desktop.
Installing goenv on macOS

Install goenv via brew

$ brew install goenv
...
$ goenv --version
goenv 2.0.2

Edit .bashrc

# .bashrc
...
# goenv
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
eval "$(goenv init -)"
...

Install go

$ goenv install -l
Available versions:
  ...
  1.19.2
$ goenv install 1.19.2
$ goenv global 1.19.2
$ go version
go version go1.19.2 darwin/amd64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment