mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 23:02:31 +00:00
15 lines
242 B
Rust
15 lines
242 B
Rust
|
use clap::Parser;
|
||
|
|
||
|
#[derive(Parser)]
|
||
|
#[clap(author, version, about)]
|
||
|
struct Cli {
|
||
|
#[clap(short, long, parse(from_occurrences))]
|
||
|
verbose: usize,
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
let cli = Cli::parse();
|
||
|
|
||
|
println!("verbose: {:?}", cli.verbose);
|
||
|
}
|