mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 06:12:40 +00:00
13 lines
211 B
Rust
13 lines
211 B
Rust
use clap::Parser;
|
|
|
|
#[derive(Parser, Debug)]
|
|
#[command(name = "basic")]
|
|
struct Opt {
|
|
#[arg(default_values_t = [1, 2, 3])]
|
|
value: u32,
|
|
}
|
|
|
|
fn main() {
|
|
let opt = Opt::parse();
|
|
println!("{opt:?}");
|
|
}
|