I want to use Go, but I\'m having trouble running the go command. I installed go1.5.2 darwin/amd64, but when I run the command go version
, I get an error in the ter
I kept running into issues and followed the steps on here and finally got a working solution: http://totzyuta.github.io/blog/2015/06/21/installing-go-by-homebrew-on-mac-os-x/
Install w/brew:
brew install golang
Edit bash_profile and add following paths:
nano ~/.bash_profile
export GOROOT=/usr/local/opt/go/libexec
export GOPATH=$HOME/.go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
Source it:
source ~/.bash_profile
Then restart terminal
go version
Output: go version go1.12 darwin/amd64