Hacking with the Go Programming Language (GoLang)
Hi everyone! I've just learned about Google's Go language and I think it'll be interesting to write software with it. I'm using this blog to record my experiences with Golang, so check it out from time to time!
In your $HOME/.bashrc, set the necessary environment variables: export GOROOT=$HOME/go export GOOS=linux # target operating system export GOARCH=386 # target compiling architecture Note that with golang, you are always "cross-compiling". So the values for $GOOS and $GOARCH are not necessarily corresponding to your Linux box. Make sure you...
I've been using Alex Gorbatchev's SyntaxHighlighter to ease the task of presenting code on this blog. Seeing that there's currently no "brush" for golang, I decided to create one. I posted the code here for anyone interested. To use it, simply put the following line where you'd normally do it for SyntaxHighlighter brushes (usually before the <head>...
I got some feedback from the Go Nuts mailing list, particularly from Russ Cox who pointed out that predefined identifiers like true, nil, int, and float are not reserved keywords. So I decided to have two kinds of highlighted keywords: those that start a type or start a declaration, including for packages: struct func interface map chan package import...
It's been some time since I last played with Golang so I decided to spend a bit of time getting to actually know golang by solving the classic snail problem, that is, to write a sequence of numbers in a square matrix of a given size n. Let's say we have a program called snail, running it with a number argument (for the square size) should look like...
It's been sometime since I've written anything on this blog. A few weeks back I realized that my syntax highlighting brush for golang wasn't available online anymore and so I decided to put it on Github. Anyway, I've been thinking about what I could do to improve my understanding of the Go programming language. Earlier today it dawned on me that...
Build your own newsfeed
Ready to give it a go?
Start a 14-day trial, no credit card required.