github.com/MontFerret/ferret@v0.18.0/pkg/stdlib/io/lib.go (about) 1 package io 2 3 import ( 4 "github.com/MontFerret/ferret/pkg/runtime/core" 5 "github.com/MontFerret/ferret/pkg/stdlib/io/fs" 6 "github.com/MontFerret/ferret/pkg/stdlib/io/net" 7 ) 8 9 // RegisterLib register `IO` namespace functions. 10 // @namespace IO 11 func RegisterLib(ns core.Namespace) error { 12 io := ns.Namespace("IO") 13 14 if err := fs.RegisterLib(io); err != nil { 15 return core.Error(err, "register `FS`") 16 } 17 18 if err := net.RegisterLib(io); err != nil { 19 return core.Error(err, "register `NET`") 20 } 21 22 return nil 23 }