feat: implement app commands
refactored to command modules with handler funcs
This commit is contained in:
1 parent
8045814b3b
commit
30a6826f46
9 files changed
+1390
-310
No files matched your search
@@ -0,0 +1,19 @@
|
||||
pub mod apps;
|
||||
pub mod ping;
|
||||
|
||||
use std::io::Write;
|
||||
|
||||
use crate::cli::{Cli, Command};
|
||||
use crate::client::OnspringRunner;
|
||||
use crate::error::CliResult;
|
||||
|
||||
pub async fn handle<C: OnspringRunner, W: Write>(
|
||||
cli: &Cli,
|
||||
client: &C,
|
||||
writer: &mut W,
|
||||
) -> CliResult<()> {
|
||||
match &cli.command {
|
||||
Command::Ping => ping::handle(client, writer, cli.pretty).await,
|
||||
Command::Apps { command } => apps::handle(command, client, writer, cli.pretty).await,
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user