struct opt

This commit is contained in:
Michael 2018-08-15 22:24:36 +00:00 committed by Michael Zhang
parent 8d50817587
commit 433e50f841
No known key found for this signature in database
GPG key ID: A1B65B603268116B
2 changed files with 5 additions and 0 deletions

View file

@ -1,5 +1,6 @@
[package] [package]
name = "dip" name = "dip"
description = "Configurable webhook server."
version = "0.1.0" version = "0.1.0"
authors = ["Michael Zhang <failed.down@gmail.com>"] authors = ["Michael Zhang <failed.down@gmail.com>"]

View file

@ -10,8 +10,12 @@ use structopt::StructOpt;
#[derive(Debug, StructOpt)] #[derive(Debug, StructOpt)]
struct Opt { struct Opt {
/// The root configuration directory for dip.
#[structopt(short = "d", long = "root", parse(from_os_str))] #[structopt(short = "d", long = "root", parse(from_os_str))]
root: PathBuf, root: PathBuf,
/// A string containing the address to bind to.
#[structopt(short = "b", long = "bind")]
bind: Option<String>,
} }
fn main() -> Result<(), Error> { fn main() -> Result<(), Error> {