Merge branch 'argparse' into 'next'

Add argument parser for the conduit executable

Closes #285

See merge request famedly/conduit!385
This commit is contained in:
Charles Hall 2024-03-11 18:03:39 +00:00
commit 741ca63e94
3 changed files with 16 additions and 0 deletions

13
src/clap.rs Normal file
View file

@ -0,0 +1,13 @@
//! Integration with `clap`
use clap::Parser;
/// Command line arguments
#[derive(Parser)]
#[clap(about, version)]
pub struct Args {}
/// Parse command line arguments into structured data
pub fn parse() -> Args {
Args::parse()
}

View file

@ -1,4 +1,5 @@
pub mod api; pub mod api;
pub mod clap;
mod config; mod config;
mod database; mod database;
mod service; mod service;

View file

@ -44,6 +44,8 @@ static GLOBAL: Jemalloc = Jemalloc;
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
clap::parse();
// Initialize config // Initialize config
let raw_config = let raw_config =
Figment::new() Figment::new()