use anyhow::Result;
use clap::Subcommand;
use crate::commands::gitignore;
use crate::commands::issue;
use crate::commands::license;
use crate::commands::pr;
#[derive(Subcommand)]
pub enum Command {
Gitignore(gitignore::preview::PreviewArgs),
Issue(issue::preview::PreviewArgs),
License(license::preview::PreviewArgs),
Pr(pr::preview::PreviewArgs),
}
impl Command {
pub fn execute(&self) -> Result<()> {
match self {
Self::Gitignore(args) => gitignore::Command::Preview(args.clone()).execute(),
Self::Issue(args) => issue::Command::Preview(args.clone()).execute(),
Self::License(args) => license::Command::Preview(args.clone()).execute(),
Self::Pr(args) => pr::Command::Preview(args.clone()).execute(),
}
}
}