1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use clap;
use crate::error::*;

#[derive(Debug)]
pub struct NewArgs {
    name: String,
}

impl NewArgs {
    pub fn from_clap<'a>(matches: &clap::ArgMatches<'a>) -> Self {
        Self {
            name: matches.value_of("NAME").unwrap().to_string(),
        }
    }
}

pub fn run(arg: NewArgs) -> Result<(), Error> {
    println!(
        "{:?}\n\n`simi new` is not implement yet! Do you want to help implementing this?",
        arg
    );
    Ok(())
}