mirror of
https://github.com/clap-rs/clap
synced 2024-12-15 07:12:32 +00:00
Add no_version example
This commit is contained in:
parent
b043260eb3
commit
495cc1f5e3
1 changed files with 16 additions and 0 deletions
16
examples/no_version.rs
Normal file
16
examples/no_version.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
#[macro_use]
|
||||
extern crate structopt;
|
||||
|
||||
use structopt::StructOpt;
|
||||
use structopt::clap::AppSettings;
|
||||
|
||||
#[derive(StructOpt, Debug)]
|
||||
#[structopt(name = "no_version", about = "", version = "", author = "",
|
||||
raw(global_settings = "&[AppSettings::DisableVersion]"))]
|
||||
struct Opt {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let opt = Opt::from_args();
|
||||
println!("{:?}", opt);
|
||||
}
|
Loading…
Reference in a new issue