Go Tutorial #6: Arrays, Slices, and Maps
In the previous tutorial, you learned about control flow with if, switch, and for. Now it is time to learn about Go’s most important data structures: arrays, slices, and maps. Slices and maps are the collections you will use every day in Go. Arrays exist too, but you will almost always use slices instead. Arrays An array in Go has a fixed size. You set the size when you declare it, and it cannot change: ...