Commit Graph

5 Commits

Author SHA1 Message Date
Naveen Gogineni
268cb973f8 Remove all flag interfaces 2022-09-04 22:51:05 -04:00
Naveen Gogineni
ab68d8a69d Cleanup: Collapse flag interfaces 2022-09-04 22:18:41 -04:00
887d31ffaf
Target minimum go 1.18 in v3-dev-main 2022-07-16 12:10:51 -04:00
Joseph Cumines
4f795e3870 Fix build for go < 1.18 2022-06-13 08:23:41 +10:00
Joseph Cumines
e77dd7bb68 Add SliceFlag wrapper and fix bugs in existing implementations
The SliceFlag implementation and associated aliases (MultiStringFlag, etc)
extend the existing slice implementations (StringSliceFlag, etc) to support
actual slices as the flag value and destination.

This change also fixes various bugs in the existing implementation. Notably,
the StringSliceFlag.Apply implementation would modify the input (default)
Value, if an env var was set, and no destination was provided. The bugs fixed
in the other three implementations were all already fixed in either
StringSliceFlag, or in one case (ignoring empty env var) in Float64SliceFlag.
2022-06-07 08:54:57 +10:00