Checklist
What problem does this solve?
When customizing the AppHelpTemplate, it would be preferable to change how the first and second column are formatted, ie - the description of the flag on a separate line, tabbed out, and restricted to a width of 80 characters. In the current state of .VisiableFlags, there is no way to separate the two columns beyond a slice of strings. Each flag has its name and description (.Usage) clumped together as a single string which is difficult or nearly impossible to parse using go's template actions.
Solution description
The two columns should be exposed as separate fields.
For the first column, .Name does not truly suffice as it both contains the long Name, Aliases, and has the input values marked by the respective name or alias. A fitting name for this could be .Names or .Flags.
For the second column, something equivalent to .Usage is sufficient.
Describe alternatives you've considered
I've tried to loop through .VisiableFlags and coerce each flag to its original type such as StingFlag and then create a custom template to load which would effectively recreate the first column. But this served to be very tedious, and admittedly, I'm not good enough in golang to do this with ease.
I also thought of potentially hand writing this part of the help template. But this deemed tedious as well and goes against the spirit of urfave/cli as it does not autogenerate based on the visible flags.
Checklist
What problem does this solve?
When customizing the
AppHelpTemplate, it would be preferable to change how the first and second column are formatted, ie - the description of the flag on a separate line, tabbed out, and restricted to a width of 80 characters. In the current state of.VisiableFlags, there is no way to separate the two columns beyond a slice of strings. Each flag has its name and description (.Usage) clumped together as a single string which is difficult or nearly impossible to parse using go's template actions.Solution description
The two columns should be exposed as separate fields.
For the first column,
.Namedoes not truly suffice as it both contains the long Name, Aliases, and has the input values marked by the respective name or alias. A fitting name for this could be.Namesor.Flags.For the second column, something equivalent to
.Usageis sufficient.Describe alternatives you've considered
I've tried to loop through
.VisiableFlagsand coerce each flag to its original type such asStingFlagand then create a custom template to load which would effectively recreate the first column. But this served to be very tedious, and admittedly, I'm not good enough in golang to do this with ease.I also thought of potentially hand writing this part of the help template. But this deemed tedious as well and goes against the spirit of
urfave/clias it does not autogenerate based on the visible flags.