mapper: stop shadowing predeclared cap

golangci-lint 2.15 predeclared check flags it.
This commit is contained in:
Kristoffer Dalby authored and Kristoffer Dalby committed 2026-10-22 14:37:00 +02:00
1 parent 123dcd9df4
commit 79ae38f0af
1 file changed
+4 -4
+4 -4
View File
@@ -174,19 +174,19 @@ func nextDNSProfileFromCapMap(capMap tailcfg.NodeCapMap) string {
candidates := make([]string, 0, len(capMap))
for cap := range capMap {
if cap == nextDNSAttrNoInfo {
for attr := range capMap {
if attr == nextDNSAttrNoInfo {
continue
}
profile, ok := strings.CutPrefix(string(cap), nextDNSAttrPrefix)
profile, ok := strings.CutPrefix(string(attr), nextDNSAttrPrefix)
if !ok || profile == "" {
continue
}
if !nextDNSProfileRE.MatchString(profile) {
log.Warn().
Str("cap", string(cap)).
Str("cap", string(attr)).
Msg("nextdns profile rejected: must match [A-Za-z0-9._-]{1,64}")
continue