Add repo add and repo show commands
This commit is contained in:
parent
b922af9283
commit
2c5ff584db
10 changed files with 219 additions and 4 deletions
22
gdn-cli/src/commands/repo.rs
Normal file
22
gdn-cli/src/commands/repo.rs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
mod add;
|
||||
mod show;
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
use crate::Environment;
|
||||
|
||||
/// Perform repo operations.
|
||||
#[derive(Debug, Parser)]
|
||||
pub enum Command {
|
||||
Show(show::Command),
|
||||
Add(add::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),
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue