implement Executor pattern
This commit is contained in:
11
internal/executor/executor.go
Normal file
11
internal/executor/executor.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package executor
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
type Executor interface {
|
||||
CombinedOutput(context.Context, string, ...string) ([]byte, error)
|
||||
CommandContext(context.Context, string, ...string) *exec.Cmd
|
||||
}
|
||||
Reference in New Issue
Block a user