First dispatcher
- Create (sub)command structure. - First experimental dispatcher to start the daemon.
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
Reference in New Issue
Block a user