Go Notes

The Go project includes … a cultural agenda of radical simplicity.

“The Go Programming Language”, Donovan and Kernighan.

These are my notes while learning Go. It's mostly things I might forget, or which I'm likely to have to refer to.

I don't expect this to be helpful to anyone else; if you're starting out, the tour is great.

Once you've finished the tour, you'll find that the specification is brief and easily readable - you can complete the whole thing in maybe five hours. It may be useful to know before you begin that the spec starts from individual language elements before working through the methods of bringing those elements together. The result is that the first complete program appears around 95% of the way through; but by the time you get there, you should understand every line of it.

There's also this Go Cheatsheet which you'd probably prefer.



Trivial syntax reminders

Methods, not classes


See also types package

int   int8  int16  int32  int64
uint uint8 uint16 uint32 uint64 uintptr
byte // alias for uint8
rune // alias for int32 - "represents a Unicode code point" (char begone!)
float32 float64
complex64 complex128