mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
cli_rs: explicit annotation of subcommand help text
Summary: Comments affecting runtime behavior disturbs me, so use explicit structopt annotations on help text. And move those annotations to the command implementations. Reviewed By: fanzeyi Differential Revision: D26412452 fbshipit-source-id: 066dfdd1c54254bae4bd2af65031487b7a1094da
This commit is contained in:
parent
89ab1a37b7
commit
2e0e5ee0ea
@ -59,14 +59,9 @@ pub struct Command {
|
||||
|
||||
#[derive(StructOpt, Debug)]
|
||||
pub enum SubCommand {
|
||||
/// Check the health of the Eden service
|
||||
#[structopt(alias = "health")]
|
||||
Status(crate::status::StatusCmd),
|
||||
|
||||
/// Print the daemon's process ID if running
|
||||
Pid(crate::pid::PidCmd),
|
||||
|
||||
/// Determine uptime of running edenfs daemon
|
||||
Uptime(crate::uptime::UptimeCmd),
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ use edenfs_client::EdenFsInstance;
|
||||
use crate::ExitCode;
|
||||
|
||||
#[derive(StructOpt, Debug)]
|
||||
#[structopt(about = "Print the daemon's process ID if running")]
|
||||
pub struct PidCmd {}
|
||||
|
||||
impl PidCmd {
|
||||
|
@ -17,6 +17,7 @@ use edenfs_client::{DaemonHealthy, EdenFsInstance};
|
||||
use crate::ExitCode;
|
||||
|
||||
#[derive(StructOpt, Debug)]
|
||||
#[structopt(about = "Check the health of the Eden service")]
|
||||
pub struct StatusCmd {
|
||||
/// Wait up to TIMEOUT seconds for the daemon to respond
|
||||
#[structopt(long, default_value = "3")]
|
||||
|
@ -17,6 +17,7 @@ use edenfs_client::{DaemonHealthy, EdenFsInstance};
|
||||
use crate::ExitCode;
|
||||
|
||||
#[derive(StructOpt, Debug)]
|
||||
#[structopt(about = "Determine uptime of running edenfs daemon")]
|
||||
pub struct UptimeCmd {}
|
||||
|
||||
struct HumanTime {
|
||||
|
Loading…
Reference in New Issue
Block a user