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
+4 -10
View File
@@ -85,19 +85,13 @@ func TestSSHCheckAuthConcurrent(t *testing.T) {
wg.Wait()
// Clear concurrently with reads
wg.Add(2)
go func() {
defer wg.Done()
wg.Go(func() {
s.ClearSSHCheckAuth()
}()
go func() {
defer wg.Done()
})
wg.Go(func() {
s.GetLastSSHAuth(types.NodeID(1), types.NodeID(2))
}()
})
wg.Wait()
}