node: Elaborate --help message

Signed-off-by: Slack Coder <slackcoder@server.ky>
This commit is contained in:
Slack Coder 2023-02-02 11:33:27 -05:00 committed by Alexis Sellier
parent b4ddb31cf3
commit 98f09130bb
No known key found for this signature in database
1 changed files with 14 additions and 1 deletions

View File

@ -10,6 +10,19 @@ use radicle_node::prelude::{Address, NodeId};
use radicle_node::Runtime;
use radicle_node::{logger, service};
pub const HELP_MSG: &str = r#"
Usage
radicle-node [<option>...]
Options
--connect <peer> Connect to the given peer address on start
--external-address <address> Publicly accessible address
--help Print help
--listen <address> Address to listen on
"#;
#[derive(Debug)]
struct Options {
connect: Vec<(NodeId, Address)>,
@ -56,7 +69,7 @@ impl Options {
listen.push(addr);
}
Long("help") => {
println!("usage: radicle-node [--connect <addr>]..");
println!("{HELP_MSG}");
process::exit(0);
}
_ => anyhow::bail!(arg.unexpected()),