Clone

Creates an independent copy of the slice, avoiding memory sharing.


slices.Clone([]int{1, 2, 3})
                        
introduction.go