Skip to content

Modification

This section contains functions to modify a slice.

Insert

Insert injects a provided value into slice on the given index.

Usage:

slice.Insert([]string{"b", "c"}, 0, "a") // []string{"a", "b", "c"}