Slick Slices in Go
· β˜• 6 min read
Slice Type Array size is fixed in Go. We can not add more elements to an existing array. This is limiting from a programmer's point of view. Go provides slices to address this concern. Slices in Go can grow. Arrays are fixed length sequence where as slices are variable length sequence in Go. Slices are very lightweight data structures. A slice has three components: a pointer, a length, and a capacity.