summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 64e011d..1eae246 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -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> {