clap/examples/at_least_two.rs

16 lines
235 B
Rust
Raw Normal View History

#[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);
}