Skip to content

chore: use WaitGroup.Go where possible#3755

Merged
DrJosh9000 merged 1 commit intomainfrom
waitgroup-go
Mar 11, 2026
Merged

chore: use WaitGroup.Go where possible#3755
DrJosh9000 merged 1 commit intomainfrom
waitgroup-go

Conversation

@DrJosh9000
Copy link
Contributor

Description

Update to a better pattern for using waitgroups.

Context

I personally desire to modernise the agent codebase to use Go 1.25 features.

Changes

Replace wg.Add(n) ... go func() { defer wg.Done() ... } pattern with wg.Go(func() { ... })

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go tool gofumpt -extra -w .)

Disclosures / Credits

I used go fix -waitgroup ./... (from Go 1.26) to get the easy ones, and found and fixed a few others manually.

@DrJosh9000 DrJosh9000 requested review from a team as code owners March 11, 2026 22:47
@DrJosh9000 DrJosh9000 mentioned this pull request Mar 11, 2026
2 tasks
Copy link
Member

@wolfeidau wolfeidau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NICE love these automated fixes 🚀

@DrJosh9000 DrJosh9000 merged commit f909d9e into main Mar 11, 2026
2 checks passed
@DrJosh9000 DrJosh9000 deleted the waitgroup-go branch March 11, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants