InStringSlice checks whether a string is inside a string slice. Comparison is case insensitive. From https://github.com/containerd/containerd/blob/7c6d710bcfc81a30ac1e8cbb2e6a4c294184f7b7/pkg/cri/util/strings.go#L21-L30
(ss []string, str string)
| 61 | // |
| 62 | // From https://github.com/containerd/containerd/blob/7c6d710bcfc81a30ac1e8cbb2e6a4c294184f7b7/pkg/cri/util/strings.go#L21-L30 |
| 63 | func InStringSlice(ss []string, str string) bool { |
| 64 | for _, s := range ss { |
| 65 | if strings.EqualFold(s, str) { |
| 66 | return true |
| 67 | } |
| 68 | } |
| 69 | return false |
| 70 | } |
| 71 | |
| 72 | func DedupeStrSlice(in []string) []string { |
| 73 | m := make(map[string]struct{}) |
no outgoing calls
searching dependent graphs…