Skip to content

Binding: rename Worker to Go - #48

Merged
floatdrop merged 1 commit into
mainfrom
worker-to-go
Sep 10, 2026
Merged

Binding: rename Worker to Go#48
floatdrop merged 1 commit into
mainfrom
worker-to-go

Conversation

@floatdrop

Copy link
Copy Markdown
Owner

Binding.Worker becomes Binding.Go, after errgroup.Group.Go and sync.WaitGroup.Go, whose contract it has always had: run a function in a goroutine the group tracks, cancel it when the group winds down, wait for it, and let its error take the group down. The chain now reads

s.Wire[*Mailer](New).Go(func(ctx context.Context, m *Mailer) error { return m.Run(ctx) })

Breaking: no alias is left behind, so a caller on Worker renames the call to Go and nothing else changes. go doc -all against v0.15.1 removes Binding.Worker and adds Binding.Go with the same signature; dihttp and dislog are unchanged. The CHANGELOG says so, for 0.16.0.

The word "worker" still names what the method registers: in the README, DESIGN.md, CLAUDE.md, the guide in all four languages, and the one error Stop reports about it, now "worker did not return". The machinery is untouched; this is a rename of one method, its docs, 13 call sites in tests and examples, and the prose.

Verified: the full gate (gofmt, vet, race suite, golangci-lint, embedmd), the examples module, and the site's check and build.

🤖 Generated with Claude Code

Binding.Worker becomes Binding.Go, after errgroup.Group.Go and
sync.WaitGroup.Go, whose contract it has always had: run a function in a
goroutine the group tracks, cancel it when the group winds down, wait for
it, and let its error take the group down. No alias is left behind, so an
upgrade breaks a caller that registers a worker, by exactly one rename; the
CHANGELOG says so and the release is 0.16.0.

The word "worker" still names what the method registers, in the docs, the
guide in all four languages, and the one error Stop reports about it, which
now reads "worker did not return" rather than "Worker hook did not return".
Nothing about the machinery changes: the binding field, the phase handoff
and releaseAfterWorker are as they were.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@floatdrop
floatdrop merged commit 08127bf into main Sep 10, 2026
4 checks passed
@floatdrop
floatdrop deleted the worker-to-go branch September 10, 2026 15:11
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.

1 participant