main.rs: testing verbose output

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2019-10-31 17:49:32 +01:00
parent 47cd81a4e1
commit 49740091bf

View File

@@ -1,3 +1,9 @@
/* advotracker infrastructure.
*
* Copyright 2019 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: 0BSD
*/
#[macro_use]
extern crate clap;
extern crate locales;
@@ -37,6 +43,15 @@ fn main() {
3 | _ => println!("Don't be crazy"),
}
// You can handle information about subcommands by requesting their matches by name
// (as below), requesting just the name used, or both at the same time
if let Some(matches) = matches.subcommand_matches("test") {
if matches.is_present("debug") {
println!("Printing debug info...");
} else {
println!("Printing normally...");
}
}
// Starting the program logic
let res = t!("main.start", lang);