Go Notes

These are my notes while learning Go. It's mostly things I might forget, or which I'm likely to have to refer to. At the time of writing, I've not yet had cause to use Go professionally so I spend much more time with other languages. These notes are to help avoid having to go on the tour yet again.

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



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


With a recent version of vim (8 or above), go fmt running on save etc:

git clone https://github.com/fatih/vim-go.git ~/.vim/pack/plugins/start/vim-go