-
-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Labels
v2-plannedPlanned for v2Planned for v2
Description
For the v2/ API, I recommend we accept the full os.Args
list, rather than taking off the zeroth argument. Most of the API's out there assume you're passing in the zeroth arg, and I don't know why we should be different.
Furthermore, it would be excellent if the library would actually parse out the zeroth arg. For example, in your top-level args struct, you could do:
type Args struct {
// XXX: We cannot have both subcommands and a positional argument.
// XXX: I think it's a bug of this library that it can't handle argv[0].
Argv0 string `arg:"zeroth"` // some special tag could let it know where to put it
or similar, so that we extract this value correctly.
This changes the behaviour, so I recommend it happen for v2.
Thanks!
Metadata
Metadata
Assignees
Labels
v2-plannedPlanned for v2Planned for v2