Go Maps
Jump to navigation
Jump to search
External
Internal
Overview
Maps and Pass-by-Value
Pointers to Maps
nil and Empty Map
nil Map
Empty Map
Declaration and Initialization
Initialization with make()
Initialization with a Composite Literal
Composite literals can be used for map initialization.
Long variable declaration and initialization with type inference:
var mm = map[string]int{"A": 1, "B": 2}
mm := map[string]int{"A": 1, "B": 2}