2022-07-22 20:43:49 +00:00
|
|
|
use clap::Parser;
|
2021-11-30 18:30:19 +00:00
|
|
|
|
|
|
|
#[derive(Parser)]
|
2022-01-11 00:47:20 +00:00
|
|
|
#[clap(author, version, about, long_about = None)]
|
2022-02-10 17:51:40 +00:00
|
|
|
#[clap(allow_negative_numbers = true)]
|
2021-11-30 18:30:19 +00:00
|
|
|
struct Cli {
|
2022-05-21 00:52:04 +00:00
|
|
|
#[clap(long, value_parser)]
|
2021-11-30 18:30:19 +00:00
|
|
|
two: String,
|
2022-05-21 00:52:04 +00:00
|
|
|
#[clap(long, value_parser)]
|
2021-11-30 18:30:19 +00:00
|
|
|
one: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let cli = Cli::parse();
|
|
|
|
|
|
|
|
println!("two: {:?}", cli.two);
|
|
|
|
println!("one: {:?}", cli.one);
|
|
|
|
}
|