Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

proposoal: NewController() should take options #238

Open
poy opened this issue Nov 30, 2018 · 7 comments
Open

proposoal: NewController() should take options #238

poy opened this issue Nov 30, 2018 · 7 comments

Comments

@poy
Copy link
Collaborator

poy commented Nov 30, 2018

There are a few features that would be best if they were opt in, whether this be for backwards compatibility or simply preference.

An established pattern for configuring something beyond sane defaults is a variadic list of options (see grpc-go for an example).

NewController(t TestReporter, opts ...ControllerOption){
 // ...
}
@poy poy added enhancement and removed v.1.3.x labels Dec 12, 2018
@poy poy added this to the v1.3.x milestone Dec 12, 2018
@msabramo
Copy link
Contributor

Can this issue be closed?

@profsmallpine
Copy link

profsmallpine commented Sep 27, 2019

@balshetzer This opens the door to add some nice improvements to the error messages, which has been very difficult for my team to grok after we switched from a super basic in house mocking system. We were hoping to make some improvements, but many of the open pull requests do not seem to get any attention. Can you provide any clarity on how to move PRs through and if we were to invest in some changes, could we do so and see PRs merged or is there just not enough time for whoever is managing this project?

@poy
Copy link
Collaborator Author

poy commented Sep 27, 2019

@profsmallpine Please feel free to open an issue to discuss and propose what you are needing. From there, we should be able to sort out what PRs we should do.

I'm going to start carving out more time to ensure PRs aren't just sitting :)

@poy
Copy link
Collaborator Author

poy commented Sep 27, 2019

@msabramo This has not actually been fixed yet. The commit referencing this issue was in poy/mock and not golang. I wasn't happy with it, so I never made the PR.

@codyoss
Copy link
Member

codyoss commented Feb 28, 2020

@poy Did you have examples of options that you would like to see?

@poy
Copy link
Collaborator Author

poy commented Feb 28, 2020

A few that come to mind:

  • Reversing the order in which mocks are registered (to match gmock for example)
  • Reporting styles (verbose vs quiet)

@codyoss
Copy link
Member

codyoss commented Mar 4, 2020

Example of an option: #246

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants