Skip to content

Clarify that RegisterEventType is the sole registration entry point#14

Merged
hstern merged 1 commit into
mainfrom
secevent-registration-docs
Jun 21, 2026
Merged

Clarify that RegisterEventType is the sole registration entry point#14
hstern merged 1 commit into
mainfrom
secevent-registration-docs

Conversation

@hstern

@hstern hstern commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Docs-only. An implementor of an event vocabulary was unsure whether to register event types via init() or via RegisterEventType — treating them as alternatives. They are not: RegisterEventType is the only registration call, and init is simply where a vocabulary places it so a side-effect import wires the whole vocabulary in (the database/sql driver idiom).

This spells that out positively in the RegisterEventType godoc and the README "Register an event type" section. No code change.

🤖 Generated with Claude Code

Spell out, in the RegisterEventType godoc and the README, that an event
vocabulary registers via a single RegisterEventType call per event type
placed in the package's init function — and that init is where the call
goes, not an alternative registration API. Frames it as the database/sql
driver idiom so an implementor reaches for the side-effect-import wiring
without second-guessing whether there is a non-init path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hstern hstern enabled auto-merge (squash) June 21, 2026 11:12
@hstern hstern merged commit b54b815 into main Jun 21, 2026
4 checks passed
@hstern hstern deleted the secevent-registration-docs branch June 21, 2026 11:13
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