1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-03-11 15:00:10 +02:00
ferret/pkg/stdlib/io/lib.go

23 lines
489 B
Go
Raw Normal View History

2019-10-19 21:17:34 +03:00
package io
import (
"github.com/MontFerret/ferret/pkg/runtime/core"
"github.com/MontFerret/ferret/pkg/stdlib/io/fs"
"github.com/MontFerret/ferret/pkg/stdlib/io/net"
2019-10-19 21:17:34 +03:00
)
// RegisterLib register `IO` namespace functions.
func RegisterLib(ns core.Namespace) error {
io := ns.Namespace("IO")
if err := fs.RegisterLib(io); err != nil {
2019-10-19 21:17:34 +03:00
return core.Error(err, "register `FS`")
}
if err := net.RegisterLib(io); err != nil {
return core.Error(err, "register `NET`")
}
2019-10-19 21:17:34 +03:00
return nil
}