Appending to a slice
To grow a slice, use the built-in append function:
func append(s []T, vs ...T) []T
You pass in a slice and one or more values, and you get back a new slice with those values added at the end.
If the underlying array is too small to fit the new values, Go allocates a bigger one automatically. The returned slice points to the new array.
You can append multiple values at once: append(s, 2, 3, 4).
Try it: Start with a nil slice and keep appending. Watch how len and cap grow.