Matthew Maurer | 32e7669 | 2020-06-02 11:15:15 -0700 | [diff] [blame] | 1 | // Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu> |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
| 4 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
| 5 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your |
| 6 | // option. This file may not be copied, modified, or distributed |
| 7 | // except according to those terms. |
| 8 | |
| 9 | use structopt::StructOpt; |
| 10 | |
| 11 | mod options { |
| 12 | use super::StructOpt; |
| 13 | |
| 14 | #[derive(Debug, StructOpt)] |
| 15 | pub struct Options { |
| 16 | #[structopt(subcommand)] |
| 17 | pub subcommand: super::subcommands::SubCommand, |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | mod subcommands { |
| 22 | use super::StructOpt; |
| 23 | |
| 24 | #[derive(Debug, StructOpt)] |
| 25 | pub enum SubCommand { |
| 26 | /// foo |
| 27 | Foo { |
| 28 | /// foo |
| 29 | bars: Vec<String>, |
| 30 | }, |
| 31 | } |
| 32 | } |