all: use sync.WaitGroup.Go

Drops the Add/Done bookkeeping, which in batcher.go was spread across
three functions.
This commit is contained in:
Kristoffer Dalby
2026-08-25 09:43:47 +00:00
committed by Kristoffer Dalby
parent 245b81401c
commit 373c60efe3
9 changed files with 46 additions and 106 deletions
+5 -11
View File
@@ -735,17 +735,11 @@ func assertClientsState(t *testing.T, clients []TailscaleClient) {
var wg sync.WaitGroup
for _, client := range clients {
wg.Add(1)
c := client // Avoid loop pointer
go func() {
defer wg.Done()
assertValidStatus(t, c)
assertValidNetcheck(t, c)
assertValidNetmap(t, c)
}()
wg.Go(func() {
assertValidStatus(t, client)
assertValidNetcheck(t, client)
assertValidNetmap(t, client)
})
}
t.Logf("waiting for client state checks to finish")