mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-18 22:34:54 +09:00
refact: use generics for contains functions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user