geagle/Boolean.go

16 lines
182 B
Go
Raw Permalink Normal View History

2019-02-10 23:05:31 +01:00
package geagle
type Boolean string
func True() Boolean {
return "yes"
}
func False() Boolean {
return "no"
}
func (b Boolean) ToBool() bool {
return b == "yes" || b == "on"
}