1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/pkg/stdlib/lib.go

56 lines
1.2 KiB
Go
Raw Normal View History

2018-09-18 22:42:38 +02:00
package stdlib
import (
"github.com/MontFerret/ferret/pkg/runtime/core"
"github.com/MontFerret/ferret/pkg/stdlib/arrays"
2018-09-18 22:42:38 +02:00
"github.com/MontFerret/ferret/pkg/stdlib/collections"
2020-03-11 03:18:04 +02:00
"github.com/MontFerret/ferret/pkg/stdlib/datetime"
2018-09-18 22:42:38 +02:00
"github.com/MontFerret/ferret/pkg/stdlib/html"
2019-10-19 20:17:34 +02:00
"github.com/MontFerret/ferret/pkg/stdlib/io"
"github.com/MontFerret/ferret/pkg/stdlib/math"
2018-10-07 23:58:22 +02:00
"github.com/MontFerret/ferret/pkg/stdlib/objects"
2018-09-18 22:42:38 +02:00
"github.com/MontFerret/ferret/pkg/stdlib/strings"
"github.com/MontFerret/ferret/pkg/stdlib/types"
"github.com/MontFerret/ferret/pkg/stdlib/utils"
)
func RegisterLib(ns core.Namespace) error {
if err := types.RegisterLib(ns); err != nil {
return err
}
2018-09-18 22:42:38 +02:00
if err := strings.RegisterLib(ns); err != nil {
return err
}
if err := math.RegisterLib(ns); err != nil {
return err
2018-09-18 22:42:38 +02:00
}
if err := collections.RegisterLib(ns); err != nil {
return err
}
2020-03-11 03:18:04 +02:00
if err := datetime.RegisterLib(ns); err != nil {
return err
}
if err := arrays.RegisterLib(ns); err != nil {
return err
}
if err := objects.RegisterLib(ns); err != nil {
return err
}
if err := html.RegisterLib(ns); err != nil {
return err
}
2018-09-18 22:42:38 +02:00
2019-10-19 20:17:34 +02:00
if err := io.RegisterLib(ns); err != nil {
return err
}
return utils.RegisterLib(ns)
2018-09-18 22:42:38 +02:00
}