1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use clap::{AppSettings, Parser, Subcommand};
use crate::cli::run::RunCommand;
#[allow(clippy::large_enum_variant)]
#[derive(Subcommand)]
enum Commands {
Run(RunCommand),
}
#[derive(Parser)]
#[clap(name = "hakoniwa", version, about, long_about = None)]
#[clap(global_setting(AppSettings::DeriveDisplayOrder))]
pub struct RootCommand {
#[clap(subcommand)]
command: Commands,
}
pub fn execute() {
let cli = RootCommand::parse();
match &cli.command {
Commands::Run(cmd) => RunCommand::execute(cmd),
}
}