Learning Go: A Slice of Go

Mike McMillan
Level Up Coding
Published in
6 min readMar 17, 2020

--

Photo by Henry Be on Unsplash

In this article I’m going to demonstrate how to use the slice data structure. Slices are unbound sequences of data of the same type. A slice can grow and shrink so it is not fixed in size the way arrays are fixed. There is a lot to say about slices so I will continue discussing them in my next article as well.

Before I go into how to work with slices, I need to mention that an overwhelming number of programming…

--

--

Mike McMillan writes about computer programming and running. See more of his writing and courses at https://mmcmillan.gumroad.com.