Skip to content

Commit

Permalink
Fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
asdine committed Jul 21, 2021
1 parent a013f48 commit b9b3124
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion document/value_wasm.go → document/create_wasm.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
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) {
case nil:
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
Expand Down
1 change: 0 additions & 1 deletion document/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b9b3124

Please sign in to comment.