Installing Go on MacOSX and Verifying It Runs
Environment
- MacOSX 10.10.3 Yosemite
Installation Steps
Install with brew
1 | $ brew install go |
Check the Go version
1 | $ go version |
Add to .bash_profile
*If you use zsh, add this to ~/.zshrc instead
1 | export GOROOT=/usr/local/opt/go/libexec |
Create a sample file (hello.go)
vim hello.go
1 | package main |
Run the file
1 | go run hello.go |
If “Hello, World” is displayed, you’ve succeeded!
The Go installation is complete.
That’s all.
Installing Go on MacOSX and Verifying It Runs
https://kenzo0107.github.io/en/2015/05/18/install-go-macosx/