k3s/vendor/github.com/rancher/wrangler/pkg/slice/contains.go

23 lines
348 B
Go
Raw Normal View History

2019-01-12 04:58:27 +00:00
package slice
func ContainsString(slice []string, item string) bool {
for _, j := range slice {
if j == item {
return true
}
}
return false
}
func StringsEqual(left, right []string) bool {
if len(left) != len(right) {
return false
}
for i := 0; i < len(left); i++ {
if left[i] != right[i] {
return false
}
}
return true
}