1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-03-03 15:02:32 +02:00

change Object.Get(key values.String) (core.Value, bool) to Object.Get(key values.String) (core.Value, values.Boolean) for consistency.

This commit is contained in:
= 2018-10-07 23:55:12 +03:00
parent 2c67482467
commit a51faf8d05

View File

@ -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) {