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
In my application I'm using yaml.v3 instead of yaml.v2, which confita uses. This makes it problematic, since confita cannot read my types that have custom UnmarshalYAML methods (the signature differs between yaml.v2 and yaml.v3).
I believe support for yaml.v3 could be added in a backwards compatible way, e.g. by passing opts to file.NewBackend(...). For example:
In my application I'm using yaml.v3 instead of yaml.v2, which confita uses. This makes it problematic, since confita cannot read my types that have custom
UnmarshalYAML
methods (the signature differs between yaml.v2 and yaml.v3).I believe support for yaml.v3 could be added in a backwards compatible way, e.g. by passing opts to
file.NewBackend(...)
. For example:and an example option could be:
used like this:
As a side effect, this would also allow supporting any file format, not just the built-in yaml, json, and toml.
Alternatively, if introducing functional options is undesirable, we could instead add new functions like:
What do you think? It should be a simple change and I could contribute a PR if this is something you'd be interested in.
The text was updated successfully, but these errors were encountered: