pkg/environment: Remove exec related functions

This commit starts the migration to remove the environment package. It
introduced an abstraction that is not being used, and removing it makes
the code simpler to maintain.

This commit removes all 'exec' related package.
This commit is contained in:
Tom Wiesing 2023-03-02 11:03:33 +01:00
parent 066390e30d
commit 14bb7f1086
No known key found for this signature in database
6 changed files with 32 additions and 25 deletions

View file

@ -6,8 +6,6 @@ import (
"io/fs"
"net"
"time"
"github.com/tkw1536/goprogram/stream"
)
// Environment represents an environment that a program can run it.
@ -43,10 +41,6 @@ type Environment interface {
Listen(network, address string) (net.Listener, error)
DialContext(context context.Context, network, address string) (net.Conn, error)
Executable() (string, error)
Exec(ctx context.Context, io stream.IOStream, workdir string, exe string, argv ...string) func() int
LookPathAbs(name string) (string, error)
}
type WritableFile interface {