pub mod apply;
pub mod check;
pub mod export;
pub mod learn;
pub mod list;
pub mod scan;
use anyhow::Result;
use clap::Subcommand;
#[derive(Subcommand)]
pub enum Commands {
Learn(learn::LearnArgs),
Scan(scan::ScanArgs),
Apply(apply::ApplyArgs),
Check(check::CheckArgs),
Export(export::ExportArgs),
List(list::ListArgs),
}
pub fn execute(command: Commands) -> Result<()> {
match command {
Commands::Learn(args) => learn::execute(args),
Commands::Scan(args) => scan::execute(args),
Commands::Apply(args) => apply::execute(args),
Commands::Check(args) => check::execute(args),
Commands::Export(args) => export::execute(args),
Commands::List(args) => list::execute(args),
}
}