Learning Golang

I want to play with the Go Programming Language! This is my learning path.



I remember when Go was announced on november 2009. It was really interesting, also because it is nice to follow a project since the beginning. But I decided to learn it only at the time of this writing.

It has interesting features, a clean ecosystem, it runs on Google App Engine: it is very attractive!



Get your installer from Go Downloads.


Create or edit the following environment variables

the path to your Go installation
see here
edit it to find the go binary in your PATH

For instance, on Windows add the environment variables

Don’t forget to create GOPATH folder

For instance, open an MS-DOS prompt and launch

C:\> mkdir %GOPATH%

On Mac OSX, create a folder for Golang

mkdir ~/.Golang

Then add the following to your shell profile

export GOPATH=~/.Golang
export GOBIN=$GOPATH/bin

Vim integration

See Go section in my Vim configuration.

Code 30 minutes everyday

Inspired by Why Go is elegant and makes my code elegant and Write code everyday articles, since I am a mathematician, I started my quest on Project Euler to get my hands dirty with Go.

Package template

Choose a good name for a Golang package, for instance foo. Create an homonym GitHub repository, start with files:


Just one line of code, declaring the package name: holds the main documention page that will be showed on godoc.org website.

// Package foo oneline description.
package foo


Start with a file like this, changing of course package name and description.

# foo

> go for... package description here