5 Commits

Author SHA1 Message Date
85ff0c550a
Un-regress from v3 porting losses 2022-10-13 08:15:14 -04:00
Felix Lange
82ea9f70c0
Call FlagStringer in String() method of slice flags
The default help template relies on the String() method of Flag
to render the flag. For most flag types, String() indirects through
FlagStringer, so that is the best place to customize flag rendering.

FlagStringer was not called for slice flags because their help output
differs from other flags in two ways: there can be multiple default
values, and the flag name is shown two times to indicate that the flag
can be specified multiple times.

To make multiple values work in the FlagStringer, I simply changed
GetValue() to return all values.

Showing the flag more than once is achieved through a new interface,
DocGenerationSliceFlag, which the FlagStringer uses to decide whether
the flag is a slice flag type.
2022-10-09 09:50:12 -04:00
f8faf77e43
Post-porting fixes for v3 2022-10-03 10:06:01 -04:00
Naveen Gogineni
7097d0eedd
Fix tests per latest main 2022-10-03 07:48:56 -04:00
Naveen Gogineni
fdcbf28476
Merge changes from main 2022-10-03 07:41:53 -04:00