gitlab.com/evatix-go/core@v1.3.55/coredata/stringslice/Clone.go (about) 1 package stringslice 2 3 // Clone on nil or empty makes new &[]string{} 4 // else makes a copy of itself 5 func Clone(slice []string) (newSlice []string) { 6 if len(slice) == 0 { 7 return []string{} 8 } 9 10 return CloneUsingCap(0, slice) 11 }