2021-10-04 18:02:47 +00:00
|
|
|
// Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu>
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2021-07-13 17:50:55 +00:00
|
|
|
use clap::Parser;
|
2021-10-04 18:02:47 +00:00
|
|
|
|
2021-07-13 17:50:55 +00:00
|
|
|
#[derive(Parser, Debug)]
|
2022-09-02 19:20:39 +00:00
|
|
|
#[command(name = "basic")]
|
2021-10-04 18:02:47 +00:00
|
|
|
struct Opt {
|
2022-09-02 19:20:39 +00:00
|
|
|
#[arg(default_value_t = -10)]
|
2021-10-04 18:02:47 +00:00
|
|
|
value: u32,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let opt = Opt::parse();
|
|
|
|
println!("{:?}", opt);
|
|
|
|
}
|