gitlab.com/evatix-go/core@v1.3.55/coredata/stringslice/CloneUsingCap.go (about) 1 package stringslice 2 3 func CloneUsingCap(newAdditionalCap int, slice []string) []string { 4 newSlice := make( 5 []string, 6 0, 7 newAdditionalCap+len(slice)) 8 9 if len(slice) == 0 { 10 return newSlice 11 } 12 13 newSlice = append(newSlice, slice...) 14 15 return newSlice 16 }