From 01f9385687c44c5f03884dbdce8c085437438458 Mon Sep 17 00:00:00 2001 From: Oscar <5xp395ab@duck.com> Date: Sat, 7 Oct 2023 13:30:19 +0000 Subject: [PATCH] docs(rust): update `relay list` documentation --- implementations/rust/ockam/ockam_command/src/relay/list.rs | 4 +++- .../ockam_command/src/relay/static/list/after_long_help.txt | 2 +- .../ockam/ockam_command/src/relay/static/list/long_about.txt | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 implementations/rust/ockam/ockam_command/src/relay/static/list/long_about.txt diff --git a/implementations/rust/ockam/ockam_command/src/relay/list.rs b/implementations/rust/ockam/ockam_command/src/relay/list.rs index 658ea977a7d..82d019e4925 100644 --- a/implementations/rust/ockam/ockam_command/src/relay/list.rs +++ b/implementations/rust/ockam/ockam_command/src/relay/list.rs @@ -18,6 +18,7 @@ use crate::util::node_rpc; use crate::{docs, CommandGlobalOpts}; const PREVIEW_TAG: &str = include_str!("../static/preview_tag.txt"); +const LONG_ABOUT: &str = include_str!("./static/list/long_about.txt"); const AFTER_LONG_HELP: &str = include_str!("./static/list/after_long_help.txt"); /// List Relays @@ -25,10 +26,11 @@ const AFTER_LONG_HELP: &str = include_str!("./static/list/after_long_help.txt"); #[command( arg_required_else_help = false, before_help = docs::before_help(PREVIEW_TAG), + long_about = docs::about(LONG_ABOUT), after_long_help = docs::after_help(AFTER_LONG_HELP) )] pub struct ListCommand { - /// List all the relays relaying traffic to the specified node + /// Get the list of Relays at the given node #[arg(global = true, long, value_name = "NODE")] pub to: Option, } diff --git a/implementations/rust/ockam/ockam_command/src/relay/static/list/after_long_help.txt b/implementations/rust/ockam/ockam_command/src/relay/static/list/after_long_help.txt index 08e2078a319..8180939ed3d 100644 --- a/implementations/rust/ockam/ockam_command/src/relay/static/list/after_long_help.txt +++ b/implementations/rust/ockam/ockam_command/src/relay/static/list/after_long_help.txt @@ -1,3 +1,3 @@ ```sh -$ ockam relay list --at n2 +$ ockam relay list --to n2 ``` diff --git a/implementations/rust/ockam/ockam_command/src/relay/static/list/long_about.txt b/implementations/rust/ockam/ockam_command/src/relay/static/list/long_about.txt new file mode 100644 index 00000000000..5af3e6901a6 --- /dev/null +++ b/implementations/rust/ockam/ockam_command/src/relay/static/list/long_about.txt @@ -0,0 +1 @@ +List Relays on your default node. If you pass '--to ' then it lists the Relays at the given node.