1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-14 11:23:02 +02:00

#485 missed namespace

This commit is contained in:
Tim Voronov 2020-05-13 22:10:47 -04:00
parent ed8e43e4c6
commit c86eecd54c

View File

@ -4,15 +4,17 @@ import "github.com/MontFerret/ferret/pkg/runtime/core"
// RegisterLib register `PATH` namespace functions.
func RegisterLib(ns core.Namespace) error {
return ns.RegisterFunctions(
core.NewFunctionsFromMap(map[string]core.Function{
"BASE": Base,
"CLEAN": Clean,
"DIR": Dir,
"EXT": Ext,
"IS_ABS": IsAbs,
"JOIN": Join,
"MATCH": Match,
"SEPARATE": Separate,
}))
return ns.
Namespace("PATH").
RegisterFunctions(
core.NewFunctionsFromMap(map[string]core.Function{
"BASE": Base,
"CLEAN": Clean,
"DIR": Dir,
"EXT": Ext,
"IS_ABS": IsAbs,
"JOIN": Join,
"MATCH": Match,
"SEPARATE": Separate,
}))
}