mirror of
https://github.com/MontFerret/ferret.git
synced 2025-07-05 00:49:00 +02:00
build core.Functions with map
This commit is contained in:
@ -3,8 +3,10 @@ package utils
|
||||
import "github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
|
||||
func RegisterLib(ns core.Namespace) error {
|
||||
return ns.RegisterFunctions(core.FunctionsMap{
|
||||
"WAIT": Wait,
|
||||
"PRINT": Print,
|
||||
})
|
||||
return ns.RegisterFunctions(
|
||||
core.NewFunctionsFromMap(map[string]core.Function{
|
||||
"WAIT": Wait,
|
||||
"PRINT": Print,
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user