all: fix full-tree golangci-lint findings

The new full-tree golangci-lint check reports issues the --new-from-rev
diff lint hid: nine wsl_v5 whitespace gaps, a prealloc, and an unparam
(setCSRFCookie never errored, so drop the return and update callers).
gocyclo on the central UpdateNodeFromMapRequest and an SA1019 NetMap
deprecation in an integration helper are suppressed with reasons.
This commit is contained in:
Kristoffer Dalby
2026-06-20 10:28:03 +00:00
parent 2632006f5f
commit 8f314797ce
13 changed files with 17 additions and 17 deletions
+1
View File
@@ -231,6 +231,7 @@ func waitNetworkContainer(
}
found := false
for _, c := range net.Containers {
if (c.Name == testContainer || c.Name == "/"+testContainer) && match(c) {
found = true
+1
View File
@@ -1334,6 +1334,7 @@ func (t *HeadscaleInContainer) NodesByUser() (map[string][]*clientv1.Node, error
}
userMap := make(map[string][]*clientv1.Node)
for _, node := range nodes {
name := node.User.Name
userMap[name] = append(userMap[name], node)
+1 -1
View File
@@ -1111,7 +1111,7 @@ func (t *TailscaleInContainer) watchIPN(ctx context.Context) (*ipn.Notify, error
resultChan <- result{nil, fmt.Errorf("parse notify: %w", err)}
}
if notify.NetMap != nil {
if notify.NetMap != nil { //nolint:staticcheck // SA1019: NetMap is still populated on the platforms our integration containers run; migrating to InitialStatus/PeerChanges is a separate change
resultChan <- result{&notify, nil}
}
}