geagle/Boolean.go
2019-02-10 23:05:31 +01:00

16 lines
182 B
Go

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"
}