Osvaldo Santana Neto

23%
Flag icon
All of these operations are safe even if the element isn’t in the map; a map lookup using a key that isn’t present returns the zero value for its type, so, for instance, the following works even when "bob" is not yet a key in the map because the value of ages["bob"] will be 0.
The Go Programming Language
Rate this book
Clear rating
Open Preview