diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-05-18 13:25:42 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-05-18 14:25:41 +0200 |
commit | 0717aca15929ff476ac92ec3bf2242943f817a64 (patch) | |
tree | 2fda01c02aa7ed0415d567449b1781db500cf8b7 /src/cli.rs | |
parent | 7da99d17d2220dcd19f0186c7f44bc34805a2970 (diff) |
Split server into subcommand
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -14,6 +14,21 @@ pub struct CLI { #[structopt(parse(from_os_str))] configfile: Option<PathBuf>, + + #[structopt(subcommand)] + cmd: Option<Command> +} + +impl CLI { + pub fn cmd(&self) -> Option<&Command> { + self.cmd.as_ref() + } +} + +#[derive(Debug, PartialEq, StructOpt)] +#[structopt(about = "Start the server part (running in foreground")] +pub enum Command { + Server, } pub fn cli() -> Result<CLI, Error> { |