This is a creation in Article, where the information may have evolved or changed.
Mac Tool Home Brew install go
First you need to install home brew and ruby Environment (because home brew relies on Ruby )
If not, please install the link yourself
Start installing go when you're ready.
Brew Update && Install install go
You also need to configure environment variables after you go to go
Vim ~/.bash_profile or vim ~/.bash_profile
#GOROOTexport goroot=/usr/local/cellar/go/1.7. 4/libexec#gopathexport gopath= $HOME/golang#gopath binexport PATH= $PATH: $GOPATH/Bin #GOPATH root binexport PATH= $PATH: $GOROOT/bin
SOURCE ~/.bash_profile or Source ~/.bash_profile
OK Go environment configuration is complete, then enter go env to see go details
bogon:~ faunjoe$ GoEnvGoarch="AMD64"GOBIN=""Goexe=""Gohostarch="AMD64"Gohostos="Darwin"GOOS="Darwin"Gopath="/users/faunjoe/work/go"Gorace=""Goroot="/usr/local/cellar/go/1.9/libexec"Gotooldir="/usr/local/cellar/go/1.9/libexec/pkg/tool/darwin_amd64"Gccgo="Gccgo"CC="clang"Gogccflags="-fpic-m64-pthread-fno-caret-diagnostics-qunused-arguments-fmessage-length=0-fdebug-prefix-map=/var/folders /x4/zr94mx8s1n35ysp_rcl6dk7m0000gn/t/go-build768068792=/tmp/go-build-gno-record-gcc-switches-fno-common"CXX="clang++"cgo_enabled="1"Cgo_cflags="-g-o2"Cgo_cppflags=""Cgo_cxxflags="-g-o2"Cgo_fflags="-g-o2"Cgo_ldflags="-g-o2"Pkg_config="Pkg-config"