We break down Go’s standard library package
slices and three of the most practical functions for working with slices:
slices.Delete,
slices.Insert, and
slices.Clone. Using a todo list based on
[]string, we’ll see how to safely delete ranges
[i:j), insert items at a position, and make an independent copy, and we’ll also go through common mistakes (including “zombie slices” and shadowing via
:=).