Add <command> to help when a sub-command is required.
This commit is contained in:
@@ -13,7 +13,7 @@ var CLI struct {
|
|||||||
Debug bool `help:"Debug mode."`
|
Debug bool `help:"Debug mode."`
|
||||||
|
|
||||||
Rm struct {
|
Rm struct {
|
||||||
User string `help:"Run as user." short:"u"`
|
User string `help:"Run as user." short:"u" default:"default"`
|
||||||
Force bool `help:"Force removal." short:"f"`
|
Force bool `help:"Force removal." short:"f"`
|
||||||
Recursive bool `help:"Recursively remove files." short:"r"`
|
Recursive bool `help:"Recursively remove files." short:"r"`
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@ func TestHelp(t *testing.T) {
|
|||||||
})
|
})
|
||||||
require.True(t, exited)
|
require.True(t, exited)
|
||||||
t.Log(w.String())
|
t.Log(w.String())
|
||||||
require.Equal(t, `usage: test-app --required
|
require.Equal(t, `usage: test-app --required <command>
|
||||||
|
|
||||||
A test app.
|
A test app.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user