▲ | int_19h a day ago | |
It doesn't. E.g. this prints 0: var m map[string]int = nil fmt.Println(m["foo"]) The language spec is also pretty clear on this; https://go.dev/ref/spec#Map_types: > A nil map is equivalent to an empty map except that no elements may be added. |