You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought about refactoring that function in pflag to an auxiliary one that returns the individual lines in a []string and then grouping and formatting ourselves from there.
The text was updated successfully, but these errors were encountered:
Usage of test:
--intvar int some random integer (default 42)
--db.name string database name
--db.user string database user
-h, --help print this help menu
Could become then something like this:
Usage of test:
--intvar int some random integer (default 42)
Database variables:
--db.name string database name
--db.user string database user
-h, --help print this help menu
A second approach could be to allow more control f.e. with a cat:"db" in the tag and then a HelpCategories map[string]string option in the config.
I was thinking it would be nice to have support for categories. Especially for the
--help
output.The problem, however, is that pflag does not support them right now and we rely on them to generate the usage string: https://github.com/spf13/pflag/blob/master/flag.go#L649
I thought about refactoring that function in pflag to an auxiliary one that returns the individual lines in a
[]string
and then grouping and formatting ourselves from there.The text was updated successfully, but these errors were encountered: