diff options
| author | lukeflo | 2025-02-17 19:50:55 +0100 |
|---|---|---|
| committer | lukeflo | 2025-02-17 19:50:55 +0100 |
| commit | 059591a1be6b887eaca9b114fdb5b350a65bae43 (patch) | |
| tree | 40bbb1016606efa3111ea0dec051a2ef2c128ad4 /src/main.rs | |
| parent | dd8dd9611771491e723a49b41cf27b1e9090664d (diff) | |
| download | bibiman-059591a1be6b887eaca9b114fdb5b350a65bae43.tar.gz bibiman-059591a1be6b887eaca9b114fdb5b350a65bae43.zip | |
implement basic config struct and example file
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 78c5075..a0f69d1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,18 +18,20 @@ use app::App; use cliargs::CLIArgs; use color_eyre::eyre::Result; +use config::BibiConfig; use errorsetup::init_error_hooks; pub mod app; pub mod bibiman; pub mod cliargs; +pub mod config; pub mod errorsetup; pub mod tui; #[tokio::main] async fn main() -> Result<()> { // Parse CLI arguments - let mut parsed_args = CLIArgs::parse_args().unwrap(); + let mut parsed_args = CLIArgs::parse_args()?; // Print help if -h/--help flag is passed and exit if parsed_args.helparg { @@ -43,6 +45,8 @@ async fn main() -> Result<()> { std::process::exit(0); } + let cfg = BibiConfig::new(&mut parsed_args)?; + init_error_hooks()?; // Create an application. |
