-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
help
subcommand
#158
Comments
Actually I'm considering using Cobra. That requires extensive effort to retrofit. |
That seems way overkill. This has two subcommands and two flags. Why bring in those deps when the standard library will do? |
Cobra would let us generate man pages and whatnot which help with packaging. It's also a nicer API to write against. It's a slim dependency now (compared to a couple years ago which necessitated https://github.com/spf13/viper) so IMO no harm bringing it in to make UX easier and more consistent in addition to the extra features it provides. |
See also #174 |
I'd be be just as happy if the first version of the help did nothing more than print the URL to this repo's README, however, it shouldn't fail.
Personally, I often sidestep the flag parser and have POSIX, BSD, and Go-style for help and version, like this:
That way it meets everyone's expectations and costs nothing in complexity (though sometimes
help
may need to come after some sort of flag package has parsed all the things... or just`long string`
it.The text was updated successfully, but these errors were encountered: