Variables

A variable is a storage place to store a value. The set of allowed values ​​is determined by the type of the variable.


// Declaration
var name = "value"
                        

The static type of a variable is the type given in its declaration, the type given in the new call or compound literal, or the type of an element of a structured variable.

variables.go