Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
node: Elaborate --help message
Slack Coder committed 3 years ago
commit 98f09130bbbd027d5712a6787234e5caaf5059b6
parent b4ddb31cf3e9a63cd18dd99f4ee0e506a5c2af98
1 file changed +14 -1
modified radicle-node/src/main.rs
@@ -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()),