app: improve config loading and merging

This commit is contained in:
Schrottkatze 2024-01-15 10:43:35 +01:00
parent ea2e5d6075
commit 7c9dca0ae2
Signed by: schrottkatze
GPG key ID: DFD0FD205943C14A
4 changed files with 73 additions and 54 deletions

View file

@ -2,11 +2,14 @@ use config::Config;
use welcome_msg::print_startup_msg;
mod config;
#[allow(unused)]
mod error_reporting;
mod welcome_msg;
fn main() {
let cfg = Config::read();
// TODO: proper error handling
let cfg = Config::read().unwrap();
if cfg.startup_msg {
print_startup_msg();