pflag icon indicating copy to clipboard operation
pflag copied to clipboard

Expose Value implementations to use with FlagSet.AddFlag

Open mattysweeps opened this issue 3 years ago • 0 comments

It would be useful when dynamically adding Flags to a FlagSet to be allowed to reuse the underlying primitive implementations of a Value.

The boolean implementation for reference: https://github.com/spf13/pflag/blob/master/bool.go#L13

This makes it difficult to use the Flag struct directly because I have to create something identical to boolValue.

mattysweeps avatar Oct 13 '21 21:10 mattysweeps