gitlab.com/evatix-go/core@v1.3.55/coredata/stringslice/SafeIndexAt.go (about) 1 package stringslice 2 3 import "gitlab.com/evatix-go/core/constants" 4 5 func SafeIndexAt(slice []string, index int) string { 6 if len(slice) == 0 || index < 0 || len(slice)-1 < index { 7 return constants.EmptyString 8 } 9 10 return slice[index] 11 }