move clap; fix version
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
74832bdc47
commit
2dd5cf8c68
4 changed files with 11 additions and 10 deletions
19
src/main/clap.rs
Normal file
19
src/main/clap.rs
Normal file
|
@ -0,0 +1,19 @@
|
|||
//! Integration with `clap`
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use clap::Parser;
|
||||
use conduit_core::utils::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() }
|
Loading…
Add table
Add a link
Reference in a new issue