gitlab.com/evatix-go/core@v1.3.55/coredata/stringslice/IndexesDefault.go (about) 1 package stringslice 2 3 func IndexesDefault(slice []string, indexes ...int) (values []string) { 4 length := len(slice) 5 6 if length == 0 || len(indexes) == 0 { 7 return []string{} 8 } 9 10 values = make([]string, len(indexes)) 11 12 inputIndex := 0 13 for _, index := range indexes { 14 values[inputIndex] = slice[index] 15 inputIndex++ 16 } 17 18 return values 19 }