github.com/aaronlehmann/figtree@v1.0.1/option.go (about) 1 package figtree 2 3 import "regexp" 4 5 type option interface { 6 IsDefined() bool 7 GetValue() interface{} 8 SetValue(interface{}) error 9 SetSource(string) 10 GetSource() string 11 } 12 13 var StringifyValue = true 14 15 // used in option parsing for map types Set routines 16 var stringMapRegex = regexp.MustCompile("[:=]") 17 18 // IsBoolFlag is required by kingpin interface to determine if 19 // this variable requires a value 20 func (b BoolOption) IsBoolFlag() bool { 21 return true 22 }