refactor clap into a separate file

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
Charles Hall 2024-03-12 22:20:03 -04:00 committed by June
parent 5454b653fe
commit 3160a36634
4 changed files with 20 additions and 13 deletions

15
src/clap.rs Normal file
View file

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