I decided to install it and learn it.
This is what I did on Leopard 10.5.8. It took 5 easy steps (thanks to Kelvin Wong).
I installed mercurial (the Google instructions to use easy_install did not work for me)
I added these lines to ~/.profile (Kevin added his to ~/.bash_profile)
To determine what file to edit or create requires you to follow a procedure because bash only reads in the first one it finds:
If you have a ~/.bash_profile file, edit it.
Else if you have a ~/.bash_login file, edit it.
Else if you have a ~/.profile file, edit it.
Else if you have a ~/.bashrc file, edit it.
Else you may create one of the above.
I already had a ~/.profile file since I use fink and it creates one. Others have used ~/.bash_profile or ~/.bashrc.
export GOROOT=$HOME/goI then closed and re-opened the terminal session.
I checked that it worked with
env | grep '^GO'Step 3.
I manually created ~/bin and followed Kelvin's recommendation to make it executable with
mkdir ~/binStep 4.
chmod 755 ~/bin
I downloaded the Go repository using mercurial.
hg clone -r release https://go.googlecode.com/hg/ $GOROOTThis printed the following:
requesting all changesStep 5.
adding file changes
added 4016 changesets with 16888 changes to 2931 files
updating working directory
1640 files updated, 0 files merged, 0 files removed, 0 files unresolved
I built the Go compiler.
cd $GOROOT/srcDuring this step, OS-X asked me to allow in incoming connection to an application called 8g.
This didn't seem to work as I got this error:
FAIL: http.TestClientThis group discussion on the error suggests that Go is actually built but that the Go DNS resolver may not work on OS-X just yet.
Get http://www.google.com/robots.txt: dial tcp www.google.com:http: lookup www.google.com. on 10.x.x.x:53: no answer from server
It will work if 'Allow all incoming connections' is selected in the Firewall section of the Security preferences.