Support a simplified kong.Groups{<key>: <title>} way of specifiying groups.

See #135.
This commit is contained in:
Alec Thomas
2021-02-09 15:08:22 +11:00
parent b68e1aba63
commit 7e27c8ecf5
5 changed files with 47 additions and 26 deletions
+4 -4
View File
@@ -150,8 +150,8 @@ func printNodeDetail(w *helpWriter, node *Node, hide bool) {
if group.Metadata.Title != "" {
w.Print(group.Metadata.Title)
}
if group.Metadata.Header != "" {
w.Print(group.Metadata.Header)
if group.Metadata.Description != "" {
w.Print(group.Metadata.Description)
}
writeFlags(w.Indent(), group.Flags)
}
@@ -170,8 +170,8 @@ func printNodeDetail(w *helpWriter, node *Node, hide bool) {
if group.Metadata.Title != "" {
w.Print(group.Metadata.Title)
}
if group.Metadata.Header != "" {
w.Print(group.Metadata.Header)
if group.Metadata.Description != "" {
w.Print(group.Metadata.Description)
}
if w.Compact {