Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor reporter to interfaces #345

Merged
merged 4 commits into from
Apr 26, 2023

Conversation

another-rex
Copy link
Collaborator

The reporter has been refactored to be an interface with various implementations. Based on the idea from Michael here: #341 (comment)

Want to get some feedback on whether this is worth changing or not.

I'm also not sure if we should have the different reporter types public here, or make them private and have the users of the library provide their own implementations of Reporter.

Copy link
Collaborator

@oliverchang oliverchang left a comment

Choose a reason for hiding this comment

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

looks a lot cleaner to me!

Copy link
Member

@michaelkedar michaelkedar left a comment

Choose a reason for hiding this comment

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

LGTM


cli.VersionPrinter = func(ctx *cli.Context) {
r = reporter.NewReporter(ctx.App.Writer, ctx.App.ErrWriter, "")
r = reporter.NewTableReporter(stdout, stderr, false)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should not have been changed because it causes tests to be flakey - see #166

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.

4 participants