2019-10-25 14:58:59 +02:00
|
|
|
package cmd
|
|
|
|
|
2019-11-19 15:29:53 +02:00
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
)
|
|
|
|
|
2020-02-12 11:12:58 +02:00
|
|
|
type runner interface {
|
2020-02-27 13:11:22 +02:00
|
|
|
SetDir(d string)
|
2020-03-03 11:26:34 +02:00
|
|
|
SetEnv(e []string)
|
2019-11-19 15:29:53 +02:00
|
|
|
Stdout(out io.Writer)
|
|
|
|
Stderr(err io.Writer)
|
2019-10-25 14:58:59 +02:00
|
|
|
}
|
2019-10-30 10:52:41 +02:00
|
|
|
|
2020-02-12 11:12:58 +02:00
|
|
|
type execRunner interface {
|
|
|
|
runner
|
|
|
|
RunExecutable(e string, p ...string) error
|
|
|
|
}
|
|
|
|
|
2019-10-30 10:52:41 +02:00
|
|
|
type shellRunner interface {
|
2020-02-12 11:12:58 +02:00
|
|
|
runner
|
2019-10-30 10:52:41 +02:00
|
|
|
RunShell(s string, c string) error
|
|
|
|
}
|