go-viper / mapstructure

Go library for decoding generic map values into native Go structures and vice versa.
MIT License
139 stars 13 forks source link

Decode into map with case insensitive keys #40

Open andig opened 1 month ago

andig commented 1 month ago

Using mapstructure for decoding into maps as target structure seems to be an odd edge case. There are various open issues, amongst them https://github.com/go-viper/mapstructure/issues/12 or https://github.com/mitchellh/mapstructure/issues/306 because MatchName is not applied.

As workaround I'm using https://github.com/peterbourgon/mergemap/issues/9, but it would be nice if mapstructure could apply all features to maps, too.