Small post to explain go slice basics, specially around slice length and capacity.
How an underlyig array is created in memory when we
- create a new slice
- create a new slice from an existing slice
- appending elments to a slice
- what happnes when underlaying array is full when we keep appending elements to slice.
Refer to code
go slice visuals