feat: add template

This commit is contained in:
2020-11-28 10:36:45 +08:00
parent 935dfa8a8e
commit 822b775cda
7 changed files with 83 additions and 2 deletions

17
src/cmd_install.rs Normal file
View File

@@ -0,0 +1,17 @@
use clap::{ArgMatches, SubCommand, App};
use crate::cmd::{Command, CommandError};
pub struct CommandImpl;
impl Command for CommandImpl {
fn name(&self) -> &str { "install" }
fn subcommand<'a>(&self) -> App<'a, 'a> {
SubCommand::with_name(self.name()).about("Install subcommand")
}
fn run(&self, _arg_matches: &ArgMatches, _sub_arg_matches: &ArgMatches) -> CommandError {
Ok(())
}
}