First dispatcher

- Create (sub)command structure.
- First experimental dispatcher to start the daemon.
This commit is contained in:
Malte Meiboom
2026-02-22 12:51:05 +01:00
parent 2d072bf10b
commit c33feb1ee7
14 changed files with 323 additions and 35 deletions
+19
View File
@@ -0,0 +1,19 @@
use anyhow::Result;
use crate::commands;
use crate::cli::cli_args::{CliArgs, HuskSubcommands};
use crate::config::HuskConfigContainer;
pub mod daemon;
pub async fn dispatch(cli: CliArgs, config: HuskConfigContainer) -> Result<()> {
match cli.subcommand {
HuskSubcommands::Daemon(subcmd) => {
commands::daemon::dispatch(subcmd, config).await?;
},
_ => { println!("something else"); }
}
Ok(())
}