mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
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:
1 parent
85a2615db1
commit
65e9cdd444
2 files changed
+8
-23
No files matched your search
+2
-5
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user