-
Notifications
You must be signed in to change notification settings - Fork 51
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
Weird behavior when mixing backends #77
Comments
Can you post the version of confita you are using from |
I'm using v0.8.0 |
We're slowly working on a bit of a redesign of confita that might address some of these issues. |
It seems like it caused by confita/backend/flags/flags.go Lines 143 to 149 in 86d03df
If I read it well, the implementation causes that when one flag is set @waltton's 1st case is then cased by the fact that default values are used as defaults for the flag definitions @tealeg Is it worth to try to fix this in the current state in the context of the mentioned upcoming redesign? |
Some examples of the weird behavior when mixing flag and envvar:
❌ bar default overwrite bar value from envvar
✅ foo value from envvar it's overwritten by flag as expected
❌ foo keeps the value from envvar ignoring the flag
go code:
The text was updated successfully, but these errors were encountered: