Function klask::run_app[][src]

pub fn run_app(app: App<'static>, f: impl FnOnce(&ArgMatches))
Expand description

Call with an App and a closure that contains the code that would normally be in main.

let app = App::new("Example").arg(Arg::new("debug").short('d'));
klask::run_app(app, |matches| {
   println!("{}", matches.is_present("debug"))
});