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
mock: allow testing for functional options #1023
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think It should be inserted into the mock library 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nbaztec thoughts on these changes to simplify the signature?
@boyan-soubachov can you please provide feedback on this PR? |
Co-authored-by: dillonstreator <dillonstreator@gmail.com>
@dillonstreator The suggestions look good, I've incorporated them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you :)
Summary
This PR fixes #997
In most go libraries nowadays (etcd, kubernets, aws, etc.) the functional options pattern is being used:
Changes
Adds a new argument type
FunctionalOptions
Motivation
This wasn't possible before.
Related issues
Closes #997 #1006