mirror of
https://github.com/clap-rs/clap
synced 2024-12-16 15:52:44 +00:00
16 lines
264 B
Rust
16 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);
|
||
|
}
|