Articles tagged with ‘slices’RSS
Build your own slice: Make, Literals and Re-slicing
So far we have only created slices by slicing arrays, but there are more convenient ways to create new slices. In this article we will look at make, literals and re-slicing.Wed 30 Aug, 2023Read now
Should you use slices of pointers to structs?
What is the difference between a slice of pointers and a slice of values? And when should you use one or the other? This article explains.Sun 20 Aug, 2023Read now
Should you use pointers to slices in Go?
What is the point of using pointers to slices? This article discusses when it's a good idea to use pointers to slices.Thu 3 Aug, 2023Read now
Build your own slice: Append and Copy
Append and copy are commonly used functions, but they can have some surprising behavior. This article helps you build a good intuition by showing you how to implement them yourself.Tue 18 Jul, 2023Read now
Build your own slice: Arrays and slices
An introduction to arrays, slices and their relationship. Get a solid mental model by implementing your own slice.Mon 26 Jun, 2023Read now