mirror of
https://github.com/caddyserver/caddy.git
synced 2025-11-01 04:22:36 +08:00
Use WaitGroup.Go to simplify code (#7253)
Signed-off-by: mickychang9 <mickychang9@outlook.com>
This commit is contained in:
@ -149,11 +149,9 @@ func TestLoadConcurrent(t *testing.T) {
|
|||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
|
|
||||||
for i := 0; i < 100; i++ {
|
for i := 0; i < 100; i++ {
|
||||||
wg.Add(1)
|
wg.Go(func() {
|
||||||
go func() {
|
|
||||||
_ = Load(testCfg, true)
|
_ = Load(testCfg, true)
|
||||||
wg.Done()
|
})
|
||||||
}()
|
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user