diff options
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 -} |