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