mirror of
https://github.com/clap-rs/clap
synced 2024-12-15 23:32:32 +00:00
15 lines
235 B
Rust
15 lines
235 B
Rust
#[macro_use]
|
|
extern crate clap;
|
|
|
|
use clap::Clap;
|
|
|
|
#[derive(Clap, Debug)]
|
|
struct Opt {
|
|
#[clap(raw(required = "true", min_values = "2"))]
|
|
foos: Vec<String>,
|
|
}
|
|
|
|
fn main() {
|
|
let opt = Opt::parse();
|
|
println!("{:?}", opt);
|
|
}
|