further improvements
This commit is contained in:
@@ -4,10 +4,22 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var (
|
||||
TRUE = Boolean{Value: true}
|
||||
FALSE = Boolean{Value: false}
|
||||
)
|
||||
|
||||
type Boolean struct {
|
||||
Value bool
|
||||
}
|
||||
|
||||
func NewBoolean(value bool) Boolean {
|
||||
if value {
|
||||
return TRUE
|
||||
}
|
||||
return FALSE
|
||||
}
|
||||
|
||||
func (b Boolean) Bool() bool {
|
||||
return b.Value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user