This issue will track (probably) the most requested feature for Viper: case sensitivity.
Every other issue will be closed in favor of this one.
We know this is something that the community wants (although based on feedbacks, it might not be a majority), so it's being considered for Viper v2. It doesn't mean it will be implemented though.
Please see for more details https://github.com/spf13/viper#does-viper-support-case-sensitive-keys
What is the timeline for a decision on incorporating case sensitivity into v2 as well as the release of v2?
Maybe key case sensitive can be viper config param, maybe like WithCaseSensitive etc. When WithCaseSensitive == true, all viper operation is case sensitive, or not.
I want to mention a little bit about the benefits of case sensitivity. Because the structure public fields of golang start with uppercase, when the read configuration is consistent with the structure fields, we can directly use the configuration structure for deserialization, which saves a lot of time and avoids some unnecessary intermediate conversion.
Unmarshal is case insensitive, so it should work either way.
Unmarshal is case insensitive, so it should work either way.
Thanks!
Maybe I'm wrong, but because of the automatic function here, I have to take on additional processing work. And usually, the configuration files are set by themselves, which means that these format designs are useful to users. Is this really right ?