Basic types
Go’s basic types are:
bool
string
int int8 int16 int32 int64
uint uint8 uint16 uint32 uint64 uintptr
byte // alias for uint8
rune // alias for int32
// represents a Unicode code point
float32 float64
complex64 complex128
Like imports, variable declarations can be grouped into a factored block — handy for package-level vars.
Reach for int by default for integers. It’s 32 or 64 bits depending on your platform, and it’s what most Go code uses. Only go for a sized or unsigned type when you have a specific reason.