@@ -51,7 +51,7 @@ func TestHelpOptionalArgs(t *testing.T) {
5151 assert .NoError (t , err )
5252 })
5353 assert .True (t , exited )
54- expected := `Usage: test-app [<one> [<two>]]
54+ expected := `Usage: test-app [<one> [<two>]] [flags]
5555
5656Arguments:
5757 [<one>] One optional arg.
@@ -105,7 +105,7 @@ func TestHelp(t *testing.T) {
105105 assert .NoError (t , err )
106106 })
107107 assert .True (t , exited )
108- expected := `Usage: test-app --required <command>
108+ expected := `Usage: test-app --required <command> [flags]
109109
110110A test app.
111111
@@ -120,13 +120,13 @@ Flags:
120120 -s, --[no-]sort Is sortable or not.
121121
122122Commands:
123- one --required
123+ one --required [flags]
124124 A subcommand.
125125
126- two <three> --required --required-two --required-three
126+ two <three> --required --required-two --required-three [flags]
127127 Sub-sub-arg.
128128
129- two four --required --required-two
129+ two four --required --required-two [flags]
130130 Sub-sub-command.
131131
132132Run "test-app <command> --help" for more information on a command.
@@ -144,7 +144,7 @@ Run "test-app <command> --help" for more information on a command.
144144 assert .NoError (t , err )
145145 })
146146 assert .True (t , exited )
147- expected := `Usage: test-app two <three> --required --required-two --required-three
147+ expected := `Usage: test-app two <three> --required --required-two --required-three [flags]
148148
149149Sub-sub-arg.
150150
@@ -215,18 +215,18 @@ func TestFlagsLast(t *testing.T) {
215215 assert .NoError (t , err )
216216 })
217217 assert .True (t , exited )
218- expected := `Usage: test-app --required <command>
218+ expected := `Usage: test-app --required <command> [flags]
219219
220220A test app.
221221
222222Commands:
223- one --required
223+ one --required [flags]
224224 A subcommand.
225225
226- two <three> --required --required-two --required-three
226+ two <three> --required --required-two --required-three [flags]
227227 Sub-sub-arg.
228228
229- two four --required --required-two
229+ two four --required --required-two [flags]
230230 Sub-sub-command.
231231
232232Flags:
@@ -253,7 +253,7 @@ Run "test-app <command> --help" for more information on a command.
253253 assert .NoError (t , err )
254254 })
255255 assert .True (t , exited )
256- expected := `Usage: test-app two <three> --required --required-two --required-three
256+ expected := `Usage: test-app two <three> --required --required-two --required-three [flags]
257257
258258Sub-sub-arg.
259259
@@ -320,7 +320,7 @@ func TestHelpTree(t *testing.T) {
320320 assert .NoError (t , err )
321321 })
322322 assert .True (t , exited )
323- expected := `Usage: test-app <command>
323+ expected := `Usage: test-app <command> [flags]
324324
325325A test app.
326326
@@ -353,7 +353,7 @@ Run "test-app <command> --help" for more information on a command.
353353 assert .NoError (t , err )
354354 })
355355 assert .True (t , exited )
356- expected := `Usage: test-app one (un,uno) <command>
356+ expected := `Usage: test-app one (un,uno) <command> [flags]
357357
358358subcommand one
359359
@@ -414,7 +414,7 @@ func TestHelpCompactNoExpand(t *testing.T) {
414414 assert .NoError (t , err )
415415 })
416416 assert .True (t , exited )
417- expected := `Usage: test-app <command>
417+ expected := `Usage: test-app <command> [flags]
418418
419419A test app.
420420
@@ -443,7 +443,7 @@ Run "test-app <command> --help" for more information on a command.
443443 assert .NoError (t , err )
444444 })
445445 assert .True (t , exited )
446- expected := `Usage: test-app one (un,uno) <command>
446+ expected := `Usage: test-app one (un,uno) <command> [flags]
447447
448448subcommand one
449449
@@ -607,7 +607,7 @@ func TestAutoGroup(t *testing.T) {
607607 }),
608608 )
609609 _ , _ = app .Parse ([]string {"--help" , "two" })
610- assert .Equal (t , `Usage: test two
610+ assert .Equal (t , `Usage: test two [flags]
611611
612612A non grouped subcommand.
613613
@@ -691,7 +691,7 @@ func TestHelpGrouping(t *testing.T) {
691691 assert .True (t , exited )
692692 assert .NoError (t , err )
693693 })
694- expected := `Usage: test-app <command>
694+ expected := `Usage: test-app <command> [flags]
695695
696696A test app.
697697
@@ -710,26 +710,26 @@ Group B
710710 --grouped-b-string=STRING A string flag grouped in B.
711711
712712Commands:
713- two
713+ two [flags]
714714 A non grouped subcommand.
715715
716716Group title taken from the kong.ExplicitGroups option
717717 A group header
718718
719- one thing <arg>
719+ one thing <arg> [flags]
720720 subcommand thing
721721
722- one <other>
722+ one <other> [flags]
723723 subcommand other
724724
725- three
725+ three [flags]
726726 Another subcommand grouped in A.
727727
728728Group B
729- one <stuff>
729+ one <stuff> [flags]
730730 subcommand stuff
731731
732- four
732+ four [flags]
733733 Another subcommand grouped in B.
734734
735735Run "test-app <command> --help" for more information on a command.
@@ -747,7 +747,7 @@ Run "test-app <command> --help" for more information on a command.
747747 assert .NoError (t , err )
748748 assert .True (t , exited )
749749 })
750- expected := `Usage: test-app two
750+ expected := `Usage: test-app two [flags]
751751
752752A non grouped subcommand.
753753
@@ -796,7 +796,7 @@ func TestUsageOnError(t *testing.T) {
796796 _ , err := p .Parse ([]string {})
797797 p .FatalIfErrorf (err )
798798
799- expected := `Usage: test --flag=STRING
799+ expected := `Usage: test --flag=STRING [flags]
800800
801801Some description.
802802
@@ -824,7 +824,7 @@ func TestShortUsageOnError(t *testing.T) {
824824 assert .Error (t , err )
825825 p .FatalIfErrorf (err )
826826
827- expected := `Usage: test --flag=STRING
827+ expected := `Usage: test --flag=STRING [flags]
828828Run "test --help" for more information.
829829
830830test: error: missing flags: --flag=STRING
0 commit comments