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() {
|
if !path.is_file() {
|
||||||
return Err(ConfigError::NotAFile(path.to_string_lossy().to_string()));
|
return Err(ConfigError::NotAFile(path.to_string_lossy().to_string()));
|
||||||
}
|
}
|
||||||
let mut config = dhall::read_config_file(file)?;
|
let config = dhall::read_config_file(file)?;
|
||||||
for (envvar, value) in std::env::vars() {
|
// TODO: configuration by environment variables?
|
||||||
match envvar.as_str() {
|
// but rather in in a separate function
|
||||||
// Do things like this?
|
// for (envvar, value) in std::env::vars() {
|
||||||
// "BFFH_LOG" => config.logging.filter = Some(value),
|
// match envvar.as_str() {
|
||||||
_ => {}
|
// // Do things like this?
|
||||||
}
|
// // "BFFH_LOG" => config.logging.filter = Some(value),
|
||||||
}
|
// _ => {}
|
||||||
|
// }
|
||||||
|
// }
|
||||||
Ok(config)
|
Ok(config)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user