mirror of
https://github.com/OMGeeky/confique.git
synced 2026-02-23 15:38:30 +01:00
Add Builder type as convenient high level loading API
This commit is contained in:
@@ -41,13 +41,13 @@ fn main() -> Result<(), anyhow::Error> {
|
||||
print!("{}", confique::toml::format::<Conf>(FormatOptions::default()));
|
||||
println!("--------------------------------------------------------");
|
||||
|
||||
// let r = Conf::from_sources(&[
|
||||
// &Path::new("examples/files/simple.toml"),
|
||||
// &Path::new("examples/files/etc/simple.yaml"),
|
||||
// ])?;
|
||||
let r = Conf::builder()
|
||||
.file("examples/files/simple.toml")
|
||||
.file("examples/files/etc/simple.yaml")
|
||||
.load()?;
|
||||
|
||||
// println!();
|
||||
// println!("LOADED CONFIGURATION: {:#?}", r);
|
||||
println!();
|
||||
println!("LOADED CONFIGURATION: {:#?}", r);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user