add help group setting

This commit is contained in:
zzxwill
2020-08-28 11:16:25 +08:00
parent 1845f70c3d
commit af227117ab
+6 -2
View File
@@ -14,8 +14,9 @@ import (
func NewLogsCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command {
cmd := &cobra.Command{}
cmd.Use = "logs <APP-NAME>"
cmd.Short = "tail pods logs of an application"
cmd.Use = "logs <appname>"
cmd.Short = "Tail pods logs of an application"
cmd.Long = "Tail pods logs of an application"
cmd.PreRunE = func(cmd *cobra.Command, args []string) error {
if len(args) < 1 {
ioStreams.Errorf("please specify the application name")
@@ -41,6 +42,9 @@ func NewLogsCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command {
}
return nil
}
cmd.Annotations = map[string]string{
types.TagCommandType: types.TypeApp,
}
return cmd
}