mirror of
https://github.com/MontFerret/ferret.git
synced 2025-07-13 01:20:35 +02:00
Added HTTP methods (#452)
* Added HTTP methods * Added unit tests * Fixed linting issue * Replaced localhost with 127.0.0.1 * Added random port generator * Disabled http tests * Disabled HTTP GET test
This commit is contained in:
@ -3,16 +3,20 @@ 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"
|
||||
)
|
||||
|
||||
// RegisterLib register `IO` namespace functions.
|
||||
func RegisterLib(ns core.Namespace) error {
|
||||
io := ns.Namespace("IO")
|
||||
|
||||
err := fs.RegisterLib(io)
|
||||
if err != nil {
|
||||
if err := fs.RegisterLib(io); err != nil {
|
||||
return core.Error(err, "register `FS`")
|
||||
}
|
||||
|
||||
if err := net.RegisterLib(io); err != nil {
|
||||
return core.Error(err, "register `NET`")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user