-
Notifications
You must be signed in to change notification settings - Fork 161
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
Discuss: return error
for Provider(cfg Config)
#233
Labels
bug
Something isn't working
Comments
Yes, indeed. We can do a v2 release for the provider to accommodate the breaking change. |
missedone
added a commit
to missedone/koanf
that referenced
this issue
Sep 15, 2023
missedone
added a commit
to missedone/koanf
that referenced
this issue
Sep 15, 2023
missedone
added a commit
to missedone/koanf
that referenced
this issue
Sep 15, 2023
missedone
added a commit
to missedone/koanf
that referenced
this issue
Sep 15, 2023
missedone
added a commit
to missedone/koanf
that referenced
this issue
Sep 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@knadh i'd like to discuss the API change
almost all the provider func returns the object without error
example:
I'm thinking of returning an error along with provider object:
i think the original func signature support the inline the Provider instantiation within
k.Load(...)
, but for Vault, S3 and other providers relies on the external system, it pretty much returnnil
if something wrong in the config or network, etc.hence a panic threw out and the app process gets exit.
it's not very friendly to diagnose the issue.
The text was updated successfully, but these errors were encountered: