extern crate clap;

use crate::constants;

pub struct Cfg {
    pub file_path: Option<String>,
}

pub fn palladio_args() -> Cfg {
    let matches =
        clap::App::new(constants::PROGRAM_NAME)
        .version(constants::PROGRAM_VERSION)
        .author(constants::PROGRAM_AUTHOR)

        .arg(clap::Arg::with_name("i")
             .short("i")
             .long("input")
             .value_name("FILE")
             .help("The document to load on starting"))
        .get_matches();

    let file_path = matches.value_of("input").map(|x| x.to_owned());
    Cfg { file_path }
}
