SHARE
TWEET

Untitled

a guest Oct 18th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use clap; // 2.33.0
  2. use clap::{App, Arg, ArgMatches};
  3.  
  4. pub struct CLI {
  5.     clap: App<'static,'static>,
  6. }
  7.  
  8. impl CLI {
  9.  
  10.     pub fn new() -> CLI {
  11.  
  12.         CLI{
  13.             clap: App::new("My Super Program").arg(
  14.                 Arg::with_name("config")
  15.                 .short("c")
  16.                 .long("config")
  17.                 .value_name("FILE")
  18.                 .help("Sets a custom config file")
  19.                 .takes_value(true)
  20.             ),
  21.         }
  22.  
  23.     }
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top