mehcode / config-rs

⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).
Apache License 2.0
2.43k stars 206 forks source link

The keys that insert by with_list_parse_key() function should to_lowercase #428

Closed bigduu closed 10 months ago

bigduu commented 1 year ago

I'm trying to prase the key in the environment like

prefix_keylist : value1_value2
prefix_key: value

I define the source like

            config::Environment::with_prefix("PREFIX")
                .with_list_parse_key("KEYLIST")
                .separator("_")
                .list_separator("_")
                .try_parsing(true),

When try_parsing the key value, I find I can't get the correct result, so I try to debug and then find the list_parse_key not covert to lowercase as in the below image. image

Maybe we should convert the list parse key to lowercase when insert the keys