From b9b312418718f6eb24f7fea5ce480aa133e526e3 Mon Sep 17 00:00:00 2001 From: Asdine El Hrychy Date: Wed, 21 Jul 2021 15:55:21 -0400 Subject: [PATCH] Fix import --- document/{value_wasm.go => create_wasm.go} | 4 +++- document/json.go | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) rename document/{value_wasm.go => create_wasm.go} (90%) diff --git a/document/value_wasm.go b/document/create_wasm.go similarity index 90% rename from document/value_wasm.go rename to document/create_wasm.go index 66a52eab8..27b114e76 100644 --- a/document/value_wasm.go +++ b/document/create_wasm.go @@ -1,5 +1,7 @@ package document +import "github.com/genjidb/genji/types" + // NewValue creates a value from x. It only supports a few types and doesn't rely on reflection. func NewValue(x interface{}) (types.Value, error) { switch v := x.(type) { @@ -7,7 +9,7 @@ func NewValue(x interface{}) (types.Value, error) { return types.NewNullValue(), nil case types.Document: return types.NewDocumentValue(v), nil - case Array: + case types.Array: return types.NewArrayValue(v), nil case int: return types.NewIntegerValue(int64(v)), nil diff --git a/document/json.go b/document/json.go index b0d88ea0b..88de776ca 100644 --- a/document/json.go +++ b/document/json.go @@ -169,7 +169,6 @@ func (j JsonDocument) MarshalJSON() ([]byte, error) { return buf.Bytes(), nil } -// String returns a string representation of the value. It implements the fmt.Stringer interface. func ValueToString(v types.Value) string { switch v.Type() { case types.NullValue: