2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-26 11:16:12 +08:00

Hide help command in help output

This commit is contained in:
Ken Hibino
2022-04-28 06:36:37 -07:00
parent 3aa716489c
commit c9c1587fea

View File

@@ -115,7 +115,7 @@ func rootHelpFunc(cmd *cobra.Command, args []string) {
var lines []*displayLine
var commands []*displayLine
for _, c := range cmd.Commands() {
if c.Hidden || c.Short == "" {
if c.Hidden || c.Short == "" || c.Name() == "help" {
continue
}
l := &displayLine{name: c.Name() + ":", desc: c.Short}