diff options
author | NeonXP <i@neonxp.dev> | 2022-11-21 04:31:56 +0300 |
---|---|---|
committer | NeonXP <i@neonxp.dev> | 2022-11-21 04:31:56 +0300 |
commit | 4054a50ce4232ebfc4dae043863ad96d46b25b43 (patch) | |
tree | 4ee57f8b0b5f66b142bb3898ba6e8162cb1b2a01 /model/types.go | |
parent | 4934a51c69e1975dc808e094e113b187ebb2c328 (diff) |
Better interfacev0.0.3
Diffstat (limited to 'model/types.go')
-rw-r--r-- | model/types.go | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/model/types.go b/model/types.go index 10e60fa..bba7527 100644 --- a/model/types.go +++ b/model/types.go @@ -3,18 +3,16 @@ package model type NodeType string const ( - StringNode NodeType = "string" - NumberNode NodeType = "number" - ObjectNode NodeType = "object" - ArrayNode NodeType = "array" - BooleanNode NodeType = "boolean" - NullNode NodeType = "null" + StringType NodeType = "string" + NumberType NodeType = "number" + ObjectType NodeType = "object" + ArrayType NodeType = "array" + BooleanType NodeType = "boolean" + NullType NodeType = "null" ) -type NodeObjectValue map[string]*Node +type NodeObjectValue map[string]Node func (n NodeObjectValue) Set(k string, v any) { n[k] = NewNode(v) } - -type NodeArrayValue []*Node |