sq/cli/cmd_help.go

22 lines
312 B
Go
Raw Normal View History

2020-08-06 20:58:47 +03:00
package cli
import (
"github.com/spf13/cobra"
)
2020-08-06 20:58:47 +03:00
func newHelpCmd() *cobra.Command {
2020-08-06 20:58:47 +03:00
cmd := &cobra.Command{
Use: "help",
Short: "Show help",
Long: "Show help.",
2020-08-06 20:58:47 +03:00
Hidden: true,
RunE: execHelp,
2020-08-06 20:58:47 +03:00
}
return cmd
2020-08-06 20:58:47 +03:00
}
2023-04-01 11:38:32 +03:00
func execHelp(cmd *cobra.Command, _ []string) error {
2020-08-06 20:58:47 +03:00
return cmd.Root().Help()
}