From a51faf8d0549fd35cfeb2ecfd3a52db27816d541 Mon Sep 17 00:00:00 2001 From: = Date: Sun, 7 Oct 2018 23:55:12 +0300 Subject: [PATCH] change Object.Get(key values.String) (core.Value, bool) to Object.Get(key values.String) (core.Value, values.Boolean) for consistency. --- pkg/runtime/values/object.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/runtime/values/object.go b/pkg/runtime/values/object.go index 7b5518ba..1a79a17d 100644 --- a/pkg/runtime/values/object.go +++ b/pkg/runtime/values/object.go @@ -3,9 +3,10 @@ package values import ( "encoding/binary" "encoding/json" - "github.com/MontFerret/ferret/pkg/runtime/core" "hash/fnv" "sort" + + "github.com/MontFerret/ferret/pkg/runtime/core" ) type ( @@ -161,14 +162,14 @@ func (t *Object) ForEach(predicate ObjectPredicate) { } } -func (t *Object) Get(key String) (core.Value, bool) { +func (t *Object) Get(key String) (core.Value, Boolean) { val, found := t.value[string(key)] if found { - return val, found + return val, NewBoolean(found) } - return None, found + return None, NewBoolean(found) } func (t *Object) GetIn(path []core.Value) (core.Value, error) {