| 13 | #[derive(Debug, StructOpt)] |
| 14 | #[structopt(name = "argparse example", about = "usage example")] |
| 15 | struct Options { |
| 16 | /// filename of video to upload |
| 17 | #[structopt(short, long)] |
| 18 | file: std::path::PathBuf, |
| 19 | /// title if none given created from filename |
| 20 | #[structopt(short, long)] |
| 21 | title: Option<String>, |
| 22 | /// Video Category |
| 23 | #[structopt(long, default_value="science", possible_values = &Categories::VARIANTS)] |
| 24 | category: Categories, |
| 25 | /// show more output |
| 26 | #[structopt(short, long)] |
| 27 | verbose: bool, |
| 28 | /// provides names to greet |
| 29 | #[structopt(short = "n", long = "name")] |
| 30 | names: Vec<String>, |
| 31 | } |
| 32 | |
| 33 | fn main() { |
| 34 | let options = Options::from_args(); |
nothing calls this directly
no outgoing calls
no test coverage detected