DescriptionDon't fight gnuflag; make use of its --help feature
When gnuflag encounters --help or -h, it calls its usage func and returns
ErrHelp. To accommodate this behaviour, and get consistent output, we supply
an empty Usage function and handle ErrHelp explicitly in Main.
Because gnuflag is now used in such a way as to suppress all "automatic"
output, there is no longer any reason to report errors in its style, and
so errors reported on the command line are now prefixed with "error: " as
originally intended; as a bonus, errors are now printed *after* help, and are
therefore rather more obvious.
https://code.launchpad.net/~fwereade/juju/go-fix-cmd-help/+merge/103448
Requires: https://code.launchpad.net/~fwereade/juju/go-fix-usage/+merge/103443
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 2
Patch Set 2 : Don't fight gnuflag; make use of its --help feature #Patch Set 3 : Don't fight gnuflag; make use of its --help feature #
Total comments: 4
Patch Set 4 : Don't fight gnuflag; make use of its --help feature #
Total comments: 5
Patch Set 5 : Don't fight gnuflag; make use of its --help feature #
MessagesTotal messages: 9
|