improvement: use clap for command line args
This commit is contained in:
committed by
Greg Heartsfield
parent
d06d227ebe
commit
73f4f60cc7
+14
@@ -0,0 +1,14 @@
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(about = "A nostr relay written in Rust", author = env!("CARGO_PKG_AUTHORS"), version = env!("CARGO_PKG_VERSION"))]
|
||||
pub struct CLIArgs {
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
help = "Use the <directory> as the location of the database",
|
||||
default_value = ".",
|
||||
required = false
|
||||
)]
|
||||
pub db: String,
|
||||
}
|
||||
Reference in New Issue
Block a user