mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
16 lines
216 B
Rust
16 lines
216 B
Rust
use clap::Parser;
|
|
|
|
#[derive(Parser, Debug)]
|
|
#[command]
|
|
struct Opt {}
|
|
|
|
#[derive(Parser, Debug)]
|
|
struct Opt1 {
|
|
#[arg = "short"]
|
|
foo: u32,
|
|
}
|
|
|
|
fn main() {
|
|
let opt = Opt::parse();
|
|
println!("{:?}", opt);
|
|
}
|