use clap::Parser;
pub(crate) mod route;
pub(crate) mod template;
#[derive(Debug, Parser)]
pub struct Opts {
#[command(subcommand)]
pub subcommand: Subcommand,
}
#[derive(Debug, Parser)]
pub enum Subcommand {
#[command(name = "route")]
Route(route::Opts),
#[command(name = "template")]
Template(template::Opts),
}
pub async fn run(subcommand: Subcommand) -> anyhow::Result<()> {
match subcommand {
Subcommand::Route(route::Opts { name }) => route::run(name).await,
Subcommand::Template(template::Opts { name }) => template::run(name).await,
}
}