We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Greetings!
Any way to use prefix which contains different sub prefix without duplication? What I mean:
use config::{Config, Environment}; fn main() { std::env::set_var("FOO_BAR_FIRST", "1"); std::env::set_var("FOO_SECOND", "2"); let conf = Config::builder() .add_source(Environment::with_prefix("FOO_BAR").separator("_")) .add_source(Environment::with_prefix("FOO").separator("_")) .build() .unwrap(); println!("{}", conf.cache); }
Got: { first => 1, bar => { first => 1, }, second => 2, }. Expected: { first => 1, second => 2, }.
{ first => 1, bar => { first => 1, }, second => 2, }
{ first => 1, second => 2, }
The text was updated successfully, but these errors were encountered:
Hi! Sorry for not getting back to this earlier.
I do not see how this could currently be done, sorry. How much of an issue is this for you?
Sorry, something went wrong.
Hi, Not really :) I just start to use one prefix FOO and get data like foo.bar.
FOO
foo.bar
Okay. I'll close this then, if that's okay with you. I hope the next generation of the config crate (see #321) does not suffer from such issues 😆
No branches or pull requests
Greetings!
Any way to use prefix which contains different sub prefix without duplication?
What I mean:
Got:
{ first => 1, bar => { first => 1, }, second => 2, }
.Expected:
{ first => 1, second => 2, }
.The text was updated successfully, but these errors were encountered: