Use WaitGroup.Go to simplify code (#7253)

Signed-off-by: mickychang9 <mickychang9@outlook.com>
This commit is contained in:
mickychang9 2025-09-12 00:15:09 +08:00 committed by GitHub
parent b462615439
commit bcd4055e89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -149,11 +149,9 @@ func TestLoadConcurrent(t *testing.T) {
var wg sync.WaitGroup
for i := 0; i < 100; i++ {
wg.Add(1)
go func() {
wg.Go(func() {
_ = Load(testCfg, true)
wg.Done()
}()
})
}
wg.Wait()
}