Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement