28 lines
809 B
Rust
28 lines
809 B
Rust
use clap::{App, Arg, ArgMatches};
|
|
|
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
|
const AUTHORS: &str = env!("CARGO_PKG_AUTHORS");
|
|
const DESCRIPTION: &str = env!("CARGO_PKG_DESCRIPTION");
|
|
|
|
/// Returns the matched command line arguments.
|
|
pub fn get_matches() -> ArgMatches<'static> {
|
|
App::new("POA ballot statistics")
|
|
.author(AUTHORS)
|
|
.version(VERSION)
|
|
.about(DESCRIPTION)
|
|
.arg(
|
|
Arg::with_name("url")
|
|
.value_name("URL")
|
|
.help("The JSON-RPC endpoint")
|
|
.takes_value(true),
|
|
)
|
|
.arg(
|
|
Arg::with_name("verbose")
|
|
.short("v")
|
|
.long("verbose")
|
|
.help("More detailed output")
|
|
.takes_value(false),
|
|
)
|
|
.get_matches()
|
|
}
|