mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 07:43:17 +00:00
Use WaitGroup.Go to simplify code (#7253)
Signed-off-by: mickychang9 <mickychang9@outlook.com>
This commit is contained in:
parent
b462615439
commit
bcd4055e89
1 changed files with 2 additions and 4 deletions
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue