(name: &str, path: &str, nested: bool, mut figment: Figment)
| 33 | } |
| 34 | |
| 35 | fn load_config_in_dir(name: &str, path: &str, nested: bool, mut figment: Figment) -> Figment { |
| 36 | for ext in ["toml", "json"] { |
| 37 | let filename = format!("{}/{}.{}", path, name, ext); |
| 38 | if std::path::Path::new(&filename).exists() { |
| 39 | info!("Loading config file: {}", filename); |
| 40 | figment = load_config_file(&filename, nested, figment); |
| 41 | } |
| 42 | } |
| 43 | figment |
| 44 | } |
| 45 | |
| 46 | fn search_load_config( |
| 47 | name: &str, |