Update Help.go to make Sub Commands can be Hidden (#207)

This commit is contained in:
Dilip Somavarapu
2021-09-16 15:21:21 -07:00
committed by GitHub
parent bf5e5e843d
commit dd18549686
+3
View File
@@ -539,6 +539,9 @@ func (h *HelpOptions) CommandTree(node *Node, prefix string) (rows [][2]string)
rows = append(rows, [2]string{prefix + arg.Summary(), arg.Help})
}
for _, subCmd := range node.Children {
if subCmd.Hidden {
continue
}
rows = append(rows, h.CommandTree(subCmd, prefix)...)
}
return