feat: works

This commit is contained in:
2021-01-01 22:16:11 +08:00
parent 601f11efe6
commit 24150ca0f1
16 changed files with 555 additions and 82 deletions

View File

@@ -0,0 +1,15 @@
use clap::{App, Arg, ArgMatches};
use rust_util::information;
use crate::cmd::CommandError;
pub struct CommandImpl;
impl CommandImpl {
pub fn process_command<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
app.arg(Arg::with_name("verbose").long("verbose").short("v").multiple(true).help("Show verbose info"))
}
pub fn run(arg_matches: &ArgMatches) -> CommandError {
let verbose_count = arg_matches.occurrences_of("verbose");
information!("Verbose count: {}", verbose_count);
information!("This is default command cli ...");
Ok(())
}
}