summaryrefslogtreecommitdiffstats
path: root/vendor/clap-3.2.20/examples/tutorial_derive/03_01_flag_bool.rs
blob: de677d8c6751249e966f17252517e8fcf5caa0c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use clap::Parser;

#[derive(Parser)]
#[clap(author, version, about, long_about = None)]
struct Cli {
    #[clap(short, long, action)]
    verbose: bool,
}

fn main() {
    let cli = Cli::parse();

    println!("verbose: {:?}", cli.verbose);
}