Skip to content

Commit 495cc1f

Browse files
committed
Add no_version example
1 parent b043260 commit 495cc1f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

examples/no_version.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#[macro_use]
2+
extern crate structopt;
3+
4+
use structopt::StructOpt;
5+
use structopt::clap::AppSettings;
6+
7+
#[derive(StructOpt, Debug)]
8+
#[structopt(name = "no_version", about = "", version = "", author = "",
9+
raw(global_settings = "&[AppSettings::DisableVersion]"))]
10+
struct Opt {
11+
}
12+
13+
fn main() {
14+
let opt = Opt::from_args();
15+
println!("{:?}", opt);
16+
}

0 commit comments

Comments
 (0)