Add countable interface
This commit is contained in:
6
flag.go
6
flag.go
@@ -124,6 +124,12 @@ type Flag interface {
|
||||
GetValue() 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)
|
||||
|
||||
|
Reference in New Issue
Block a user