mirror of https://github.com/k3s-io/k3s
23 lines
348 B
Go
23 lines
348 B
Go
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
|
|
}
|