Working with Arrays, Slices, and Maps
Arrays, slices, and maps are the built-in container types defined by the Go language. They are essential parts of almost every program, and usually, the building blocks of other data structures. This section describes some of the common patterns of working with these basic data structures, as they have nuances that may not be obvious to a newcomer.
In this chapter, we will talk about the following:
- Working with arrays
- Working with slices
- Implementing a stack using slices
- Working with maps
- Implementing sets
- Using maps for thread-safe caching