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."`
|
||||
|
||||
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"`
|
||||
Recursive bool `help:"Recursively remove files." short:"r"`
|
||||
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ func TestHelp(t *testing.T) {
|
||||
})
|
||||
require.True(t, exited)
|
||||
t.Log(w.String())
|
||||
require.Equal(t, `usage: test-app --required
|
||||
require.Equal(t, `usage: test-app --required <command>
|
||||
|
||||
A test app.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user