clap/tests/privacy.rs

30 lines
801 B
Rust
Raw Normal View History

2018-02-25 10:22:24 +00:00
// Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu>
2017-11-01 20:30:46 +00:00
//
2018-02-25 10:22:24 +00:00
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
2017-11-01 20:30:46 +00:00
#[macro_use]
extern crate structopt;
2017-11-01 20:30:46 +00:00
mod options {
#[derive(Debug, StructOpt)]
pub struct Options {
2018-05-21 14:54:22 +00:00
#[structopt(subcommand)]
pub subcommand: ::subcommands::SubCommand,
2017-11-01 20:30:46 +00:00
}
}
mod subcommands {
#[derive(Debug, StructOpt)]
pub enum SubCommand {
2018-05-21 14:54:22 +00:00
#[structopt(name = "foo", about = "foo")]
Foo {
#[structopt(help = "foo")]
bars: Vec<String>,
},
2017-11-01 20:30:46 +00:00
}
}