gedaechtnas/gdn-cli/src/commands/repo.rs
2025-05-03 00:49:42 +02:00

25 lines
507 B
Rust

mod add;
mod remove;
mod show;
use clap::Parser;
use crate::Environment;
/// Perform repo operations.
#[derive(Debug, Parser)]
pub enum Command {
Show(show::Command),
Add(add::Command),
Remove(remove::Command),
}
impl Command {
pub fn run(self, env: &Environment) -> anyhow::Result<()> {
match self {
Self::Show(command) => command.run(env),
Self::Add(command) => command.run(env),
Self::Remove(command) => command.run(env),
}
}
}