mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 14:03:24 +09:00
refactor(waitgroup): replace Add/Done goroutines with WaitGroup.Go (#37764)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
This commit is contained in:
co-authored by
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
wxiaoguang
parent
e60ca35d52
commit
912afcaa51
@@ -321,11 +321,9 @@ func TestPackageMavenConcurrent(t *testing.T) {
|
||||
|
||||
var wg sync.WaitGroup
|
||||
for i := range 10 {
|
||||
wg.Add(1)
|
||||
go func(i int) {
|
||||
wg.Go(func() {
|
||||
putFile(t, fmt.Sprintf("/%s/%s.jar", packageVersion, strconv.Itoa(i)), "test", http.StatusCreated)
|
||||
wg.Done()
|
||||
}(i)
|
||||
})
|
||||
}
|
||||
wg.Wait()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user