Getting going with Go (golang)
For quite a while I’ve been wanting to get stuck into learning the Go programming language, after a colleague at Canonical (Gustavo Niemeyer) wrote enthusiastically about it… and today I took a bit of time to get started.
Getting setup on my Ubuntu Maverick VM was pretty straight forward:
- Add Gustavo’s software channel:
sudo add-apt-repository ppa:niemeyer/ppa sudo apt-get update sudo apt-get install golang export GOROOT=/usr/lib/go
- This also adds ‘gorun‘, which effectively saves you having to compile and link each time you edit your go source file – nice
- I had to then grab the go source to get the vim syntax highlighting etc. (files are provided for most editors in the source).
- Installed golang-weekly (rather than golang) to get a more recent version…
- Reverted the latest commit to gocode which was an update for the latest golang weekly release, which hadn’t yet hit the PPA.