1
0
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:
Tim Voronov
2019-07-22 17:21:20 -04:00
committed by GitHub
parent ddfb7a20e8
commit 22382a0f61
17 changed files with 290 additions and 132 deletions

View File

@ -2,8 +2,8 @@ package strings
import "github.com/MontFerret/ferret/pkg/runtime/core"
func NewLib() map[string]core.Function {
return map[string]core.Function{
func RegisterLib(ns core.Namespace) error {
return ns.RegisterFunctions(core.Functions{
"CONCAT": Concat,
"CONCAT_SEPARATOR": ConcatWithSeparator,
"CONTAINS": Contains,
@ -37,5 +37,5 @@ func NewLib() map[string]core.Function {
"UPPER": Upper,
"FMT": Fmt,
"UNESCAPE_HTML": UnescapeHTML,
}
})
}