mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-12-22 03:33:48 +01:00
fix warnings: at the moment configuration by environment variables is not implemented
This commit is contained in:
parent
c2c34ede67
commit
40ba114e61
@ -38,13 +38,15 @@ pub fn read(file: impl AsRef<Path>) -> Result<Config, ConfigError> {
|
||||
if !path.is_file() {
|
||||
return Err(ConfigError::NotAFile(path.to_string_lossy().to_string()));
|
||||
}
|
||||
let mut config = dhall::read_config_file(file)?;
|
||||
for (envvar, value) in std::env::vars() {
|
||||
match envvar.as_str() {
|
||||
// Do things like this?
|
||||
// "BFFH_LOG" => config.logging.filter = Some(value),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
let config = dhall::read_config_file(file)?;
|
||||
// TODO: configuration by environment variables?
|
||||
// but rather in in a separate function
|
||||
// for (envvar, value) in std::env::vars() {
|
||||
// match envvar.as_str() {
|
||||
// // Do things like this?
|
||||
// // "BFFH_LOG" => config.logging.filter = Some(value),
|
||||
// _ => {}
|
||||
// }
|
||||
// }
|
||||
Ok(config)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user