diff options
author | NeonXP <i@neonxp.dev> | 2022-12-27 02:37:02 +0300 |
---|---|---|
committer | NeonXP <i@neonxp.dev> | 2022-12-27 02:40:03 +0300 |
commit | 76a7f461ebbde70ea0e3d4f9b79c08139acaee7c (patch) | |
tree | 5e6dcb05f00be5109b3465ef16a6e9169a27497e /model/booleanNode.go | |
parent | 6f1d1df79f161cfc695f74d271d689ba72c44d09 (diff) |
Completely rewritedv0.1.0
Diffstat (limited to 'model/booleanNode.go')
-rw-r--r-- | model/booleanNode.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/model/booleanNode.go b/model/booleanNode.go deleted file mode 100644 index aba286e..0000000 --- a/model/booleanNode.go +++ /dev/null @@ -1,27 +0,0 @@ -package model - -import "fmt" - -type BooleanNode struct { - Value bool -} - -func (n BooleanNode) Type() NodeType { - return BooleanType -} - -func (n *BooleanNode) MarshalJSON() ([]byte, error) { - if n.Value { - return []byte("true"), nil - } - return []byte("false"), nil -} - -func (n *BooleanNode) Set(v any) error { - val, ok := v.(bool) - if !ok { - return fmt.Errorf("%v is not boolean", v) - } - n.Value = val - return nil -} |