Golang Installation / macOS Environment
1. Installation Environment
The installation environment is as follows.
- Ubuntu 10.14.5
- golang 1.12.2
2. Homebrew Package Installation
# brew install golangInstall golang using Homebrew.
3. Environment Variable Setting
| |
Set environment variables used by golang in the ~/.bash-profile file so that golang can be used from any Directory.
GOROOT: Directory where golang commands, Packages, Libraries, etc. are located.GOPATH: Home Directory of golang Programs currently being developed.GOBIN: Directory where compiled golang Binaries are copied when using thego installcommand.
4. References
- Install Go Lang on macOS with Homebrew : https://ahmadawais.com/install-go-lang-on-macos-with-homebrew/