Repository navigation
Replies: 1 comment
|
Set cmd := &cli.Command{
ArgsUsage: "<target> <endpoint>",
Arguments: []cli.Argument{
&cli.StringArg{Name: "target"},
&cli.StringArg{Name: "endpoint"},
},
}You'll get
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I think it would be nice to be able to specify Usage text within positional argument definitions (in the same way we do with flags). Right now this seems like it could be possible with
ArgumentBase.UsageText, but setting that doesn't seem to do what I want.With this code
-hdoesn't report the arguments at all. It would be nice if it printed something like:So, I'm wondering what's the intended purpose of
ArgumentBase.UsageText, and would you be open to a PR that implements this kind of treatment of arguments?All reactions