finga
d92e8029f2
In order to increase readability, maintainability and maybe a future independence regarding web frameworks move code to new files.
22 lines
606 B
Rust
22 lines
606 B
Rust
use clap::{crate_authors, crate_version, AppSettings, Parser};
|
|
|
|
#[derive(Debug, Parser)]
|
|
pub enum Command {
|
|
/// Verifies if the configuration can be parsed without errors
|
|
Configtest,
|
|
}
|
|
|
|
#[derive(Debug, Parser)]
|
|
#[clap(
|
|
version = crate_version!(),
|
|
author = crate_authors!(", "),
|
|
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>,
|
|
}
|