gitlab.com/evatix-go/core@v1.3.55/coredata/stringslice/SlicePtr.go (about) 1 package stringslice 2 3 // SlicePtr on nil or empty makes new &[]string{} 4 // else makes a pointer to self and returns 5 func SlicePtr(slice []string) (slicePtr *[]string) { 6 if len(slice) == 0 { 7 return &[]string{} 8 } 9 10 return &slice 11 }