refactor: use WaitGroup.Go to replace wg.Add(1)/go/wg.Done() boilerplate (#222)

https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#hdr-Analyzer_waitgroup
This commit is contained in:
Justin Bradford
2025-12-19 21:07:29 +10:00
committed by GitHub
parent 85a2615db1
commit 65e9cdd444
2 changed files with 8 additions and 23 deletions
+2 -5
View File
@@ -61,14 +61,11 @@ func (cli *Client) CreateIngressRecords(ctx context.Context, serviceID string) (
continue
}
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
if err = verifyCaddyReachable(ctx, m.Machine); err == nil {
reachableMachines <- m.Machine
}
}()
})
}
go func() {