Install Google GO on Mac OS (Snow Leopard)

June 16, 2010 Appirio

Google GO is a systems language Google uses on it’s own production instances. It’s nearly as fast as C++, has garbage collection, and can handle thousands of concurrent “routines”. When we started with GO, we followed the installation notes, but noticed a few other steps that needed to take place as well. We hope you find this walk through helpful.

Disclaimer: Hey, this is Appirio, right? Why a systems language? What’s that have to do w/ Cloud? The GO team is working w/ the Google App Engine team (no release date yet) and it already has huge ramifications on EC2 environments… we think it’ll be a major player down the road. Always healthy to stay ahead of the curve.

– Python (Mercurial requires Python)
Mercurial (Source Control Management)
– ~/bin directory with 755 permissions. (mkdir ~/bin then chmod 755 ~bin)

Here’s how to check your prerequisites, for reference:

Kyle-Roche-MPB:~ kyleroche$ python -V
Python 2.6.1

Kyle-Roche-MPB:~ kyleroche$ hg version
Mercurial Distributed SCM (version 1.5.4+20100601)
Copyright (C) 2005-2010 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO

Kyle-Roche-MPB:~ kyleroche$ xcodebuild -version
Xcode 3.2.2
Component versions: DevToolsCore-1648.0; DevToolsSupport-1631.0
BuildVersion: 10M2148

Adjust .bash_profile
Add the following code to your .bash_profile. If you don’t have one, create it in your ~ directory.

export GOROOT=$HOME/go
export GOOS=darwin
export GOARCH=386
export GOBIN=$HOME/bin

Here’s how to check your profile, for reference:

Kyle-Roche-MPB:~ kyleroche$ source .bash_profile

Kyle-Roche-MPB:~ kyleroche$ env | grep ^GO

Pulling down the source package:
You can use Mercurial to pull down the package from Google Code. Run the following command:

Kyle-Roche-MPB:~ kyleroche$ hg clone -r release $GOROOT
requesting all changes
adding changesets
adding manifests
adding file changes
added 5632 changesets with 22984 changes to 3660 files
updating to branch default2215 files updated, 0 files merged, 0 files removed, 0 files unresolved

Compile the package.

Final step… change to the $GOROOT/src directory. Run the following command:

Kyle-Roche-MPB:src kyleroche$ ./all.bash

There’s way too much output to be useful copying to this article. I noticed a different set of output then described in the installation guide. I think the safest way to test if it was successful is to go ahead and follow the Hello World example. If you’re confident that existence = success, you can always run which 8g or which 8l. Both of those files exists after the language is compiled.

Previous Article
Install the Salesforce Chatter for Android App on Your Phone
Install the Salesforce Chatter for Android App on Your Phone

Jeff Douglas invited me to attend Cloudforce last Tuesday to demo my Salesforce Chatter for ...

Next Article
Salesforce Chatter for Android
Salesforce Chatter for Android

Jeff Douglas This is an overview and demo of the application that I submitted for the Chatter Developer Cha...