• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use clap::Parser;
2 
3 #[derive(Parser)]
4 #[command(author, version, about, long_about = None)]
5 struct Cli {
6     #[arg(short, long)]
7     name: Option<String>,
8 }
9 
main()10 fn main() {
11     let cli = Cli::parse();
12 
13     println!("name: {:?}", cli.name.as_deref());
14 }
15