From 5ba320b45b968fbe93800769de4dd20daee724e8 Mon Sep 17 00:00:00 2001 From: mzz2017 <2017@duck.com> Date: Tue, 14 Mar 2023 00:46:45 +0800 Subject: [PATCH] docs: add notes for cmd --- cmd/reload.go | 5 +++-- cmd/run.go | 2 +- cmd/suspend.go | 3 ++- cmd/validate.go | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/reload.go b/cmd/reload.go index 8a71b44..8ce5942 100644 --- a/cmd/reload.go +++ b/cmd/reload.go @@ -17,7 +17,8 @@ import ( var ( reloadCmd = &cobra.Command{ - Use: "reload [pid]", + Use: "reload [pid]", + Short: "To reload config file without interrupt connections.", Run: func(cmd *cobra.Command, args []string) { internal.AutoSu() if len(args) == 0 { @@ -44,4 +45,4 @@ var ( func init() { rootCmd.AddCommand(reloadCmd) -} \ No newline at end of file +} diff --git a/cmd/run.go b/cmd/run.go index 0e99541..d42a7c7 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -38,7 +38,7 @@ var ( runCmd = &cobra.Command{ Use: "run", - Short: "Run dae in the foreground", + Short: "To run dae in the foreground.", Run: func(cmd *cobra.Command, args []string) { if cfgFile == "" { logrus.Fatalln("Argument \"--config\" or \"-c\" is required but not provided.") diff --git a/cmd/suspend.go b/cmd/suspend.go index 2c59fc4..cf3ac3b 100644 --- a/cmd/suspend.go +++ b/cmd/suspend.go @@ -17,7 +17,8 @@ import ( var ( suspendCmd = &cobra.Command{ - Use: "suspend [pid]", + Use: "suspend [pid]", + Short: "To suspend dae. This command puts dae into no-load state. Recover it by 'dae reload'.", Run: func(cmd *cobra.Command, args []string) { internal.AutoSu() if len(args) == 0 { diff --git a/cmd/validate.go b/cmd/validate.go index 401ff91..228d160 100644 --- a/cmd/validate.go +++ b/cmd/validate.go @@ -14,7 +14,7 @@ import ( var ( validateCmd = &cobra.Command{ Use: "validate", - Short: "Validate dae config", + Short: "To validating dae config.", Run: func(cmd *cobra.Command, args []string) { if cfgFile == "" { fmt.Println("Argument \"--config\" or \"-c\" is required but not provided.")