Go: Variables

There basic variable types:

TypeDescription
byteTypically a single octet(one byte). This is a byte type.
intThe most natural size of integer for the machine.
float32A single-precision floating-point value.

Declaring a Variable

Using var keyword:

var variable_name type = expression

Using short variable declaration: 

variable_name:= expression

Leave a Reply

Your email address will not be published. Required fields are marked *