webhookey/src/cli.rs
finga 856cdc9457 Update build dependencies
This needed also some adaption in order to use `clap 3.0.0-rc.0`.
2021-12-09 13:40:17 +01:00

24 lines
545 B
Rust

use clap::{AppSettings, Parser};
#[derive(Debug, Parser)]
pub enum Command {
/// Verifies if the configuration can be parsed without errors
Configtest,
}
#[derive(Debug, Parser)]
#[clap(
about,
version,
author,
global_setting = AppSettings::InferSubcommands,
global_setting = AppSettings::PropagateVersion,
)]
pub struct Opts {
/// Provide a path to the configuration file
#[clap(short, long, value_name = "FILE")]
pub config: Option<String>,
#[clap(subcommand)]
pub command: Option<Command>,
}