pkg/environment: Remove 'net' related functions

This commit continues removing the environment abstraction and removes
all 'net' related functions, replacing them by their native equivalents.
This commit is contained in:
Tom Wiesing 2023-03-02 11:07:50 +01:00
parent 14bb7f1086
commit 39207a1cb5
No known key found for this signature in database
7 changed files with 8 additions and 47 deletions

View file

@ -1,10 +1,8 @@
package environment
import (
"context"
"io"
"io/fs"
"net"
"time"
)
@ -38,9 +36,6 @@ type Environment interface {
WalkDir(root string, fn fs.WalkDirFunc) error
Abs(path string) (string, error)
Listen(network, address string) (net.Listener, error)
DialContext(context context.Context, network, address string) (net.Conn, error)
}
type WritableFile interface {

View file

@ -1,15 +0,0 @@
package environment
import (
"context"
"net"
)
func (*Native) Listen(network, address string) (net.Listener, error) {
return net.Listen(network, address)
}
func (*Native) DialContext(context context.Context, network, address string) (net.Conn, error) {
var d net.Dialer
return d.DialContext(context, network, address)
}