From 7ac9dfdf6d343b64a60a1b67ae850989903debc7 Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Mon, 23 Dec 2024 19:26:45 -0500 Subject: [PATCH] Continue massaging CLI docs, finish the publisher part of #27 --- src/cli.rs | 5 ++++- src/static_urls.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 42aef9d..c58c7e5 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -241,7 +241,8 @@ pub fn parser() -> Command { .subcommand_value_name("definitions") .subcommands(import_subcommands()), Command::new("publish") - .about("publish a message") + .about(color_print::cstr!("Publishes (inefficiently) message(s) to a queue or a stream. Only suitable for development and test environments.")) + .after_long_help(color_print::cformat!("Doc guide: {}", PUBLISHER_GUIDE_URL)) .subcommand_value_name("message") .subcommands(publish_subcommands()), Command::new("get") @@ -963,6 +964,8 @@ fn import_subcommands() -> [Command; 1] { pub fn publish_subcommands() -> [Command; 1] { [Command::new("message") .about("Publishes a message to an exchange") + .about(color_print::cstr!("Publishes (inefficiently) message(s) to a queue or a stream. Only suitable for development and test environments. Prefer messaging or streaming protocol clients!")) + .after_long_help(color_print::cformat!("Doc guide: {}", PUBLISHER_GUIDE_URL)) .arg( Arg::new("routing_key") .short('k') diff --git a/src/static_urls.rs b/src/static_urls.rs index 76bde1d..9acbe2a 100644 --- a/src/static_urls.rs +++ b/src/static_urls.rs @@ -38,3 +38,4 @@ pub(crate) const HTTP_API_ACCESS_PERMISSIONS_GUIDE_URL: &str = pub(crate) const DEFINITION_GUIDE_URL: &str = "https://rabbitmq.com/docs/definitions"; pub(crate) const CONSUMER_GUIDE_URL: &str = "https://rabbitmq.com/docs/consumers"; pub(crate) const POLLING_CONSUMER_GUIDE_URL: &str = "https://rabbitmq.com/docs/consumers#polling"; +pub(crate) const PUBLISHER_GUIDE_URL: &str = "https://rabbitmq.com/docs/publishers";