mirror of
https://github.com/MontFerret/ferret.git
synced 2025-07-15 01:25:00 +02:00
Added namespace builder (#336)
* Added namespace builder * Fixed linting issues * Added extra check * Updated e2e lib * Renamed NamespaceBuilder to NamespaceContainer and changed func receivers * Renamed NewLib to RegisterLib
This commit is contained in:
@ -5,8 +5,8 @@ import (
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
)
|
||||
|
||||
func NewLib() map[string]core.Function {
|
||||
return map[string]core.Function{
|
||||
func RegisterLib(ns core.Namespace) error {
|
||||
return ns.RegisterFunctions(core.Functions{
|
||||
"APPEND": Append,
|
||||
"FIRST": First,
|
||||
"FLATTEN": Flatten,
|
||||
@ -29,7 +29,7 @@ func NewLib() map[string]core.Function {
|
||||
"UNION_DISTINCT": UnionDistinct,
|
||||
"UNIQUE": Unique,
|
||||
"UNSHIFT": Unshift,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func ToUniqueArray(arr *values.Array) *values.Array {
|
||||
|
Reference in New Issue
Block a user