continuwuity/src/utils/clap.rs
strawberry a496cc4705 dedupe version getting code, rename to CONDUWUIT_VERSION_EXTRA
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00

20 lines
486 B
Rust

//! Integration with `clap`
use std::path::PathBuf;
use clap::Parser;
use super::conduwuit_version;
/// Commandline arguments
#[derive(Parser, Debug)]
#[clap(version = conduwuit_version(), about, long_about = None)]
pub(crate) struct Args {
#[arg(short, long)]
/// Optional argument to the path of a conduwuit config TOML file
pub(crate) config: Option<PathBuf>,
}
/// Parse commandline arguments into structured data
#[must_use]
pub(crate) fn parse() -> Args { Args::parse() }