File size: 277 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
package expflag
type FlagSet []Flag
// Has returns true if the given flag name is in the set.
//
// It will panic if the flag name is not known.
func (f FlagSet) Has(flag Flag) bool {
for _, v := range f {
if v != flag {
continue
}
return true
}
return false
}
|