|
|
@ -1,5 +1,6 @@
|
|
|
|
use docopt::Docopt;
|
|
|
|
use docopt::Docopt;
|
|
|
|
use serde::Deserialize;
|
|
|
|
use serde::Deserialize;
|
|
|
|
|
|
|
|
use log::{debug};
|
|
|
|
|
|
|
|
|
|
|
|
static USAGE: &'static str = "
|
|
|
|
static USAGE: &'static str = "
|
|
|
|
foil
|
|
|
|
foil
|
|
|
@ -28,10 +29,10 @@ struct Args {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
fn main() {
|
|
|
|
println!("Hello, world!");
|
|
|
|
pretty_env_logger::init();
|
|
|
|
let args: Args = Docopt::new(USAGE)
|
|
|
|
let args: Args = Docopt::new(USAGE)
|
|
|
|
.and_then(|dopt| dopt.deserialize())
|
|
|
|
.and_then(|dopt| dopt.deserialize())
|
|
|
|
.unwrap_or_else(|e| e.exit());
|
|
|
|
.unwrap_or_else(|e| e.exit());
|
|
|
|
println!("{:?}", args);
|
|
|
|
debug!("{:?}", args);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|