2017-11-01 20:30:46 +00:00
|
|
|
// Copyright (c) 2017 Guillaume Pinot <texitoi(a)texitoi.eu>
|
|
|
|
//
|
|
|
|
// This work is free. You can redistribute it and/or modify it under
|
|
|
|
// the terms of the Do What The Fuck You Want To Public License,
|
|
|
|
// Version 2, as published by Sam Hocevar. See the COPYING file for
|
|
|
|
// more details.
|
|
|
|
|
|
|
|
#[macro_use]
|
2018-01-29 22:51:40 +00:00
|
|
|
extern crate structopt;
|
2017-11-01 20:30:46 +00:00
|
|
|
|
|
|
|
mod options {
|
|
|
|
#[derive(Debug, StructOpt)]
|
|
|
|
pub struct Options {
|
|
|
|
#[structopt(subcommand)]
|
|
|
|
pub subcommand: ::subcommands::SubCommand,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod subcommands {
|
|
|
|
#[derive(Debug, StructOpt)]
|
|
|
|
pub enum SubCommand {
|
|
|
|
#[structopt(name = "foo", about = "foo")]
|
|
|
|
Foo {
|
|
|
|
#[structopt(help = "foo")]
|
|
|
|
bars: Vec<String>,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|