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/stringNode.go | |
parent | 6f1d1df79f161cfc695f74d271d689ba72c44d09 (diff) |
Completely rewritedv0.1.0
Diffstat (limited to 'model/stringNode.go')
-rw-r--r-- | model/stringNode.go | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/model/stringNode.go b/model/stringNode.go deleted file mode 100644 index b8dfcfb..0000000 --- a/model/stringNode.go +++ /dev/null @@ -1,24 +0,0 @@ -package model - -import "fmt" - -type StringNode struct { - Value string -} - -func (n StringNode) Type() NodeType { - return StringType -} - -func (n *StringNode) MarshalJSON() ([]byte, error) { - return []byte(`"` + n.Value + `"`), nil -} - -func (n *StringNode) Set(v any) error { - val, ok := v.(string) - if !ok { - return fmt.Errorf("%v is not string", v) - } - n.Value = val - return nil -} |