lalamove / konfig

Composable, observable and performant config handling for Go for the distributed processing era

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Allow marking all struct field as strict

walez opened this issue · comments

commented

Hi, thanks for the wonderful library.

Currently I bind my Store to a configuration struct and I have a yaml file that should always have defaults for all flags which can then be overriden with env parameters.

I think if we could add something like a BindStrict that takes in a struct and adds all the exposed fields as strict keys would allow not needing to keep a separate list of canonicalised keys to be passed manually to the StrictKey function.

Hi, sorry for the latency.

I think it's a good idea.

We're open for contributions so if you have time you can submit a PR, otherwise I'm not sure when we can implement this right now.

commented

Hi @francoispqt

I will start working on it and get a PR out for review soon.