docs: add notes for cmd

This commit is contained in:
mzz2017 2023-03-14 00:46:45 +08:00
parent c767556f70
commit 5ba320b45b
4 changed files with 7 additions and 5 deletions

View File

@ -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)
}
}

View File

@ -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.")

View File

@ -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 {

View File

@ -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.")