1
0
mirror of synced 2025-02-28 23:40:38 +00:00

22 lines
374 B
Rust
Raw Normal View History

pub mod cmds;
use clap::Parser;
use cmds::Command;
#[derive(Parser)]
#[command(author, version, about, long_about = None)]
pub struct Cli {
#[command(subcommand)]
command: Command,
}
impl Cli {
pub fn run(self) -> Result<(), Box<dyn std::error::Error>> {
self.command.run()
}
pub fn command(&self) -> &Command {
&self.command
}
}