Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Return an error in
service.NewConfigProvider
if there is no configLocations (v0.45) #4762Return an error in
service.NewConfigProvider
if there is no configLocations (v0.45) #4762Changes from all commits
697f4bb
0c8c405
e55d31a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Consistency is important.
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.
+1
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 I would prefer to see these append to the config, allowing for multiple invocations of the options, possibly provided by separate packages. The invocation of
NewConfigProvider()
ultimately controls the order in which they're applied. A small change would be required there to set the default values after applying options if the list is empty, rather than setting it first and allowing it to be overwritten.The same applies to
WithConfigMapProviders()
. There order is not important, so multiple maps can be merged.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 am confused about your comment:
I think I would prefer to see these append to the config, allowing for multiple invocations of the options, possibly provided by separate packages.
are you suggesting a global?Even without the "default" problem, your suggestion does not trivially allow "no converters" case.
Also these append thing is unclear to me, I would rather provide only one "Converter" and a "MultiConverter" implementation if the list is a problem.