1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package store
import "os/exec"
// Runner executes an external command and returns its stdout.
type Runner interface {
Run(name string, args ...string) ([]byte, error)
}
// ExecRunner runs real commands.
type ExecRunner struct{}
func (ExecRunner) Run(name string, args ...string) ([]byte, error) {
return exec.Command(name, args...).Output()
}
|