Add countable interface

This commit is contained in:
Naveen Gogineni
2022-09-05 19:13:26 -04:00
parent 15fd35e7b4
commit dbdf119742
4 changed files with 23 additions and 6 deletions

View File

@@ -139,6 +139,12 @@ type CategorizableFlag interface {
GetCategory() string
}
// Countable is an interface to enable detection of flag values which support
// repetitive flags
type Countable interface {
Count() int
}
func flagSet(name string, flags []Flag) (*flag.FlagSet, error) {
set := flag.NewFlagSet(name, flag.ContinueOnError)