Using Arrays, Slices, and Maps

Adam Freeman · Apress eBooks · 2022

In this chapter, I describe the built-in Go collection types: arrays, slices, and maps. These features allow related values to be grouped and, just as with other features, Go takes a different approach to collections when compared with other languages. I also describe an unusual aspect of Go string values, which can be treated like arrays, but behave in different ways depending on how the elements are used. Table 7-1 puts arrays, slices, and maps in context.

Read the paper · More papers on PaperTik