17 lines
398 B
Go
17 lines
398 B
Go
package executor
|
|
|
|
import (
|
|
"context"
|
|
"os/exec"
|
|
)
|
|
|
|
type LocalExecutor struct{}
|
|
|
|
func (l LocalExecutor) CombinedOutput(ctx context.Context, name string, arg ...string) ([]byte, error) {
|
|
return l.CommandContext(ctx, name, arg...).CombinedOutput()
|
|
}
|
|
|
|
func (l LocalExecutor) CommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd {
|
|
return exec.CommandContext(ctx, name, arg...)
|
|
}
|