diff options
Diffstat (limited to 'vendor/clap-3.2.20/examples/tutorial_derive/03_01_flag_bool.rs')
-rw-r--r-- | vendor/clap-3.2.20/examples/tutorial_derive/03_01_flag_bool.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/clap-3.2.20/examples/tutorial_derive/03_01_flag_bool.rs b/vendor/clap-3.2.20/examples/tutorial_derive/03_01_flag_bool.rs new file mode 100644 index 000000000..de677d8c6 --- /dev/null +++ b/vendor/clap-3.2.20/examples/tutorial_derive/03_01_flag_bool.rs @@ -0,0 +1,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); +} |