Lesson 19. The ever-versatile map
After reading lesson 19, you’ll be able to
- Use maps as collections for unstructured data
- Declare, access, and iterate over maps
- Explore some uses of the versatile map type
Maps come in handy when you’re searching for something, and we’re not just talking about Google Maps (www.google.com/mars/). Go provides a map collection with keys that map to values. Whereas arrays and slices are indexed by sequential integers, map keys can be nearly any type.
Maps are especially useful for ...