Web Development

Go Language is an open source programming language created at Google by Robert Griesemer, Ken Thompson and Rob Pike. Homebrew has always made our lives better when working with a Mac. Here’s how to install Go Language on a Mac.

Brew as always has been helpful when installing applications

$ brew install go
==> Downloading https://homebrew.bintray.com/bottles/go-1.5.1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring go-1.5.1.yosemite.bottle.tar.gz
==> Caveats
As of go 1.2, a valid GOPATH is required to use the 'go get' command:
  https://golang.org/doc/code.html#GOPATH

You may wish to add the GOROOT-based install location to your PATH:
  export PATH=$PATH:/usr/local/opt/go/libexec/bin
==> Summary
(beer)  /usr/local/Cellar/go/1.5.1: 5330 files, 273M

Set the GOPATH Environment Variable

One Caveat here is that we need to set the $GOPATH where we will be working with the Go Language.

The folder we are going to work on will be ~/Documents/Projects/go

$ mkdir $HOME/Documents/Projects/go
$ export GOPATH=$HOME/Documents/Projects/go

Let’s go work on Go! Here’s an Introduction