I don't really like the way the command-line arguments are specified right now. Everything is an optional flag which requires writing out a redundant argument name. This would be even worse with #4. Also, urfave/cli doesn't seem to follow POSIX semantics, which is a bit annoying.
I'd rather the CLI look something like: golist <command> <package-path> [<package path> ...] where <command> is one of the original flags that specified output modes. All the other flags could remain optional.
golist <command> <package-path> [<package path> ...]
<command>
This could maybe be done with pflag instead for optional things and just switching commands ourselves. Or maybe using cobra. Probably depends on how heavy these things are.
pflag
cobra
@eclipseo Please play a little with modist and tell us if it is better. I tried to fix the CLI interface.
modist
cobra is difficult to use in a core utility like golist. It has lots of requirements, so bootsrapping a Go stack that required cobra to work would be quite difficult.
golist
True, cobra uses quite a bit; pflag has no dependencies though, which would be even better than urfave/cli.
urfave/cli
Log in to comment on this ticket.