2
0

fix: use WaitGroup.Go() for modernize linter

Replace wg.Add(1)/go func()/defer wg.Done() pattern with
the simpler wg.Go() method as required by the modernize linter.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-09 18:11:52 -05:00
parent f3b025bc3e
commit c91dc4dfc6
2 changed files with 4 additions and 8 deletions

View File

@@ -367,9 +367,7 @@ func uploadChunks(ctx context.Context, server, token string, session *UploadSess
// Start workers
for range parallel {
wg.Add(1)
go func() { //nolint:modernize // Using separate error channel for first-error semantics
defer wg.Done()
wg.Go(func() {
for job := range jobs {
err := uploadChunk(server, token, session.ID, job.number, job.data)
if err != nil {
@@ -378,7 +376,7 @@ func uploadChunks(ctx context.Context, server, token string, session *UploadSess
}
tracker.Add(int64(len(job.data)))
}
}()
})
}
// Progress display