Addressing github #231 - Cleaning up cli-help text

This commit is contained in:
Kevin Guthrie 2024-05-21 10:10:23 -04:00
parent 5cf12e17c2
commit 9ea87b231e
2 changed files with 19 additions and 13 deletions

2
.bleep
View file

@ -1 +1 @@
755ce66cddc4805c0a264c31a2e3cd7cab352755 719b4dcafd471ecfa9e4ade3abfb217929afddc6

View file

@ -122,35 +122,41 @@ impl Default for ServerConf {
#[clap(name = "basic")] #[clap(name = "basic")]
pub struct Opt { pub struct Opt {
/// Whether this server should try to upgrade from a running old server /// Whether this server should try to upgrade from a running old server
/// #[clap(
/// `-u` or `--upgrade` can be used short,
#[clap(short, long)] long,
help = "This is the base set of command line arguments for a pingora-based service"
)]
pub upgrade: bool, pub upgrade: bool,
/// Whether should run this server in the background /// Whether should run this server in the background
///
/// `-d` or `--daemon` can be used
#[clap(short, long)] #[clap(short, long)]
pub daemon: bool, pub daemon: bool,
/// Not actually used. This flag is there so that the server is not upset seeing this flag /// Not actually used. This flag is there so that the server is not upset seeing this flag
/// passed from `cargo test` sometimes /// passed from `cargo test` sometimes
#[clap(long)] #[clap(long, hidden = true)]
pub nocapture: bool, pub nocapture: bool,
/// Test the configuration and exit /// Test the configuration and exit
/// ///
/// When this flag is set, calling `server.bootstrap()` will exit the process without errors /// When this flag is set, calling `server.bootstrap()` will exit the process without errors
/// ///
/// This flag is useful for upgrading service where the user wants to make sure the new /// This flag is useful for upgrading service where the user wants to make sure the new
/// service can start before shutting down the old server process. /// service can start before shutting down the old server process.
/// #[clap(
/// `-t` or `--test` can be used short,
#[clap(short, long)] long,
help = "This flag is useful for upgrading service where the user wants \
to make sure the new service can start before shutting down \
the old server process."
)]
pub test: bool, pub test: bool,
/// The path to the configuration file. /// The path to the configuration file.
/// ///
/// See [`ServerConf`] for more details of the configuration file. /// See [`ServerConf`] for more details of the configuration file.
/// #[clap(short, long, help = "The path to the configuration file.")]
/// `-c` or `--conf` can be used
#[clap(short, long)]
pub conf: Option<String>, pub conf: Option<String>,
} }