refactor clap into a separate file
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
5454b653fe
commit
3160a36634
4 changed files with 20 additions and 13 deletions
15
src/clap.rs
Normal file
15
src/clap.rs
Normal 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() }
|
Loading…
Add table
Add a link
Reference in a new issue