Debian Codegraph @

third_party/rust/clap/examples/tutorial_builder/03_02_option.rs

raw
1 use clap::{command, Arg};
2
3 fn main() {
4 let matches = command!() // requires `cargo` feature
5 .arg(Arg::new("name").short('n').long("name"))
6 .get_matches();
7
8 println!("name: {:?}", matches.get_one::<String>("name"));
9 }