Go's Slices Are Pointers With a Trick: Capacity, Aliasing and the Growth Algorithm
A Go slice is a pointer, a length and a capacity over a shared backing array: append doubles under 256 elements and grows 1.25x above it, and every growth memmoves the old contents …