mirror of
https://github.com/coredns/coredns.git
synced 2025-12-08 19:35:10 -05:00
Refactoring of k8s helpers
This commit is contained in:
11
middleware/pkg/strings/slice.go
Normal file
11
middleware/pkg/strings/slice.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package strings
|
||||
|
||||
// StringInSlice check whether string a is a member of slice.
|
||||
func StringInSlice(a string, slice []string) bool {
|
||||
for _, b := range slice {
|
||||
if b == a {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user