This is a mirror of official site: http://jasper-net.blogspot.com/

Installing and Running Google Go on Mac OS X

| Thursday, June 17, 2010
A while ago Google gave us a brand new language, Go. In the last couple of years I really haven't heard much about it, but I decided to finally install it and give it a try. This tutorial will guide you step-by-step on how to install Google Go and start writing your own applications.

Go's website has very good instructions on how to install it, and this tutorial will take many steps directly from there. Their website has instructions for all the major platforms, however this article will be specific to Mac OS X running on a 64 bit Intel processor.

Google does not distribute the binaries, which means you'll have to build it for your own platform.

Setup Environment Variables

When you build Go, the compiler is going to need to know a few things.

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

$GOROOT is the path to where you'll download the Google Go source code. I left mine where Google suggested, which is $HOME/go (/Users/[username]/go).

Read more: Switch on code

Posted via email from .NET Info

0 comments: