clap/examples/no_version.rs

21 lines
367 B
Rust
Raw Normal View History

2018-03-12 11:36:21 +00:00
#[macro_use]
extern crate structopt;
use structopt::clap::AppSettings;
2018-06-05 16:16:17 +00:00
use structopt::StructOpt;
2018-03-12 11:36:21 +00:00
#[derive(StructOpt, Debug)]
2018-06-05 16:16:17 +00:00
#[structopt(
name = "no_version",
about = "",
version = "",
author = "",
raw(global_settings = "&[AppSettings::DisableVersion]")
)]
2018-05-21 14:54:22 +00:00
struct Opt {}
2018-03-12 11:36:21 +00:00
fn main() {
let opt = Opt::from_args();
println!("{:?}", opt);
}