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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user