1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-03-21 21:47:43 +02:00
Aleksandr Yakimenko ed8e43e4c6
Add Path functions (#505)
* Add Path functions

* Add unit tests
2020-05-12 22:19:41 -04:00

19 lines
430 B
Go

package path
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,
}))
}