arriven / db1000n

MIT License
1.18k stars 208 forks source link

Implement compatibility layer between snake case and camel case in utils.Decode #472

Closed arriven closed 2 years ago

arriven commented 2 years ago

For historical reasons config values use snake_case and we need to support backward-compatibility right now. Need to implement a compatibility layer that would convert snake case to camel case when decoding and remove all mapstructure tags so that all the configs can both be in snake and camel case

arriven commented 2 years ago

based on initial assessment it should be possible to simply remove "_" from keys and provide a map of overrides for potential cases where I could introduce a shorter name in mapstructure tags

arriven commented 2 years ago

fixed in 8de49ba441d51531358c1facf940da0961bd484c