Skip to content

Inline sink emit calls#196

Open
carole-lavillonniere wants to merge 1 commit intomainfrom
refact-pr-127-2
Open

Inline sink emit calls#196
carole-lavillonniere wants to merge 1 commit intomainfrom
refact-pr-127-2

Conversation

@carole-lavillonniere
Copy link
Copy Markdown
Collaborator

@carole-lavillonniere carole-lavillonniere commented Apr 23, 2026

Summary

Refactoring addressing suggested improvement #1 from @thrau in this comment #127 (review)

The goal is to make reading the code easier, be more explicit and idiomatic go, and remove some lines of code.

Changes

  • Replace package-level EmitXxx(sink, ...) helpers with direct sink.Emit(output.XxxEvent{...}) calls at all sites
  • Change Event from a generic union constraint to a sealed marker interface (sealedEvent() unexported method), enabling an exported Sink.Emit(event Event) without generics
  • Remove ~88 lines of boilerplate emit helpers; retain SpinnerStart/SpinnerStop/SpinnerStartWithDuration as value constructors (they encode the MinDuration default)

@carole-lavillonniere
Copy link
Copy Markdown
Collaborator Author

@claude review once

Comment thread internal/output/events.go Outdated
@carole-lavillonniere carole-lavillonniere force-pushed the refact-pr-127-2 branch 3 times, most recently from ad41d18 to 5ad97b8 Compare April 23, 2026 12:53
@carole-lavillonniere carole-lavillonniere changed the title inline sink emit calls Inline sink emit calls Apr 23, 2026
@carole-lavillonniere carole-lavillonniere marked this pull request as ready for review April 27, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant