1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
use clap::{App, Arg};

#[must_use]
pub fn new() -> String {
    let matches = App::new(env!("CARGO_PKG_NAME"))
        .version(env!("CARGO_PKG_VERSION"))
        .arg(
            Arg::with_name("endpoint")
                .help("https://10.0.1.2:8443")
                .min_values(1)
                .required(true),
        )
        .get_matches();

    matches.value_of("endpoint").unwrap().into()
}