Thursday, 10 September 2015

Advanced Go: Maps

A map maps keys to values.
Maps must be created with make (not new) before use; the nil map is empty and cannot be assigned to.


Map literals

Map literals are like struct literals, but the keys are required.


If the top-level type is just a type name, you can omit it from the elements of the literal.



Do like it, if you found it usefull.

No comments:

Post a Comment