clap/examples/tutorial_builder/03_02_option.rs
2022-02-15 08:54:59 -06:00

9 lines
202 B
Rust

use clap::{arg, command};
fn main() {
let matches = command!()
.arg(arg!(-n --name <NAME>).required(false))
.get_matches();
println!("name: {:?}", matches.value_of("name"));
}