You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With configor 1.2.1, the above config led to FooBar being set to an empty string, while with configor 1.2.2, FooBar will be set to the default value of "baz".
First of all, I think that this should have gotten mentioned somewhere, because it's kind of a breaking change in some cases.
Besides that, I think the new behavior is a bit counterintuitive. For my taste, you should be able to overwrite a property - even if it has a default value - by explicitly setting it in YAML. So for me it would make sense to (a) take default value if key is not specified in YAML, but (b) take whatever value from the YAML if key is specified there, even if blank.
The text was updated successfully, but these errors were encountered:
Consider the following example:
config.go
:config.yaml
:foo_bar:
With configor 1.2.1, the above config led to
FooBar
being set to an empty string, while with configor 1.2.2,FooBar
will be set to the default value of"baz"
.First of all, I think that this should have gotten mentioned somewhere, because it's kind of a breaking change in some cases.
Besides that, I think the new behavior is a bit counterintuitive. For my taste, you should be able to overwrite a property - even if it has a default value - by explicitly setting it in YAML. So for me it would make sense to (a) take default value if key is not specified in YAML, but (b) take whatever value from the YAML if key is specified there, even if blank.
The text was updated successfully, but these errors were encountered: