refact: use generics for contains functions
This commit is contained in:
parent
ea9aaa6022
commit
8061abe279
5 changed files with 14 additions and 22 deletions
4
acls.go
4
acls.go
|
@ -332,7 +332,7 @@ func excludeCorrectlyTaggedNodes(
|
|||
out := []Machine{}
|
||||
tags := []string{}
|
||||
for tag, ns := range aclPolicy.TagOwners {
|
||||
if containsString(ns, namespace) {
|
||||
if contains(ns, namespace) {
|
||||
tags = append(tags, tag)
|
||||
}
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ func excludeCorrectlyTaggedNodes(
|
|||
|
||||
found := false
|
||||
for _, t := range hi.RequestTags {
|
||||
if containsString(tags, t) {
|
||||
if contains(tags, t) {
|
||||
found = true
|
||||
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue