Chapter 4. Arrays, slices, and maps
In this chapter
- Array internals and fundamentals
- Managing collections of data with slices
- Working with key/value pairs using maps
It’s difficult to write programs that don’t need to store and read collections of data. If you use databases or files, or access the web, you need a way to handle the data you receive and send. Go has three different data structures that allow you to manage collections of data: arrays, slices, and maps. These data structures are baked into the language and used throughout the standard library. Once you learn how these data structures work, programming in Go will become fun, fast, and flexible.
4.1. Array internals and fundamentals
It makes sense to start with arrays because ...
Get Go in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.