chore: reorg code

This commit is contained in:
2022-03-27 12:40:20 +08:00
parent b9dbcb8f80
commit 8ab2126034
11 changed files with 30 additions and 36 deletions

View File

@@ -3,17 +3,17 @@ extern crate rust_util;
mod fido;
mod digest;
mod register;
mod sign;
mod pgp;
mod cmd_register;
mod cmd_sign;
mod cmd_pgp;
mod pgpcardutil;
mod pgpcardlist;
mod pgpcardsign;
mod pgpcarddecrypt;
mod piv;
mod pivsign;
mod chall;
mod challconfig;
mod cmd_pgpcardlist;
mod cmd_pgpcardsign;
mod cmd_pgpcarddecrypt;
mod cmd_piv;
mod cmd_pivsign;
mod cmd_chall;
mod cmd_challconfig;
use clap::{App, AppSettings, ArgMatches};
use rust_util::util_clap::{CommandError, Command};
@@ -38,16 +38,16 @@ fn main() {
fn inner_main() -> CommandError {
let commands: Vec<Box<dyn Command>> = vec![
Box::new(register::CommandImpl),
Box::new(sign::CommandImpl),
Box::new(pgp::CommandImpl),
Box::new(pgpcardlist::CommandImpl),
Box::new(pgpcardsign::CommandImpl),
Box::new(pgpcarddecrypt::CommandImpl),
Box::new(piv::CommandImpl),
Box::new(pivsign::CommandImpl),
Box::new(chall::CommandImpl),
Box::new(challconfig::CommandImpl),
Box::new(cmd_register::CommandImpl),
Box::new(cmd_sign::CommandImpl),
Box::new(cmd_pgp::CommandImpl),
Box::new(cmd_pgpcardlist::CommandImpl),
Box::new(cmd_pgpcardsign::CommandImpl),
Box::new(cmd_pgpcarddecrypt::CommandImpl),
Box::new(cmd_piv::CommandImpl),
Box::new(cmd_pivsign::CommandImpl),
Box::new(cmd_chall::CommandImpl),
Box::new(cmd_challconfig::CommandImpl),
];
let mut app = App::new(env!("CARGO_PKG_NAME"))
.version(env!("CARGO_PKG_VERSION"))