MCPcopy Create free account
hub / github.com/alecthomas/kong / writeCommandTree

Function writeCommandTree

help.go:271–283  ·  view source on GitHub ↗
(w *helpWriter, node *Node)

Source from the content-addressed store, hash-verified

269}
270
271func writeCommandTree(w *helpWriter, node *Node) {
272 rows := make([][2]string, 0, len(node.Children)*2)
273 for i, cmd := range node.Children {
274 if cmd.Hidden {
275 continue
276 }
277 rows = append(rows, w.CommandTree(cmd, "")...)
278 if i != len(node.Children)-1 {
279 rows = append(rows, [2]string{"", ""})
280 }
281 }
282 writeTwoColumns(w, rows)
283}
284
285type helpFlagGroup struct {
286 Metadata *Group

Callers 1

printNodeDetailFunction · 0.85

Calls 2

writeTwoColumnsFunction · 0.85
CommandTreeMethod · 0.80

Tested by

no test coverage detected