gitlab.com/evatix-go/core@v1.3.55/coredata/stringslice/FirstOrDefaultWith.go (about) 1 package stringslice 2 3 func FirstOrDefaultWith(slice []string, defaultValue string) (result string, isSuccess bool) { 4 if len(slice) == 0 { 5 return defaultValue, false 6 } 7 8 return slice[0], true 9 }