Search⌘ K

OSX

Explore how to install Go on OSX using Homebrew and configure your workspace by setting GOPATH and system paths. Understand the setup process to prepare your environment for Go development, including recommendations for additional tools to manage third-party libraries.

Homebrew

The easiest way to install Go for development on OS X is to use homebrew.

Using Terminal.app install homebrew:

Javascript (babel-node)
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Once homebrew is installed, install Go to be able to crosscompile:

Javascript (babel-node)
$ brew install go --cross-compile-common

In just a few minutes, go should be all installed ...