mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
2918ee52cc
ExecMockRunner and ShellMockRunner both needs an environment. "Extending" here leads to "subclasses" for both cases. That is more long-winded since it could be.
23 lines
300 B
Go
23 lines
300 B
Go
package cmd
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
type runner interface {
|
|
SetDir(d string)
|
|
SetEnv(e []string)
|
|
Stdout(out io.Writer)
|
|
Stderr(err io.Writer)
|
|
}
|
|
|
|
type execRunner interface {
|
|
runner
|
|
RunExecutable(e string, p ...string) error
|
|
}
|
|
|
|
type shellRunner interface {
|
|
runner
|
|
RunShell(s string, c string) error
|
|
}
|