aboutsummaryrefslogtreecommitdiff
path: root/structopt/examples/no_version.rs
blob: a542ec1e1cad14ee35379644ce265011cc215064 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! How to completely remove version.

use structopt::clap::AppSettings;
use structopt::StructOpt;

#[derive(StructOpt, Debug)]
#[structopt(
    name = "no_version",
    no_version,
    global_settings = &[AppSettings::DisableVersion]
)]
struct Opt {}

fn main() {
    let opt = Opt::from_args();
    println!("{:?}", opt);
}