1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

[refactoring] Condence common functions for execRunner and shellRunner into runner interface (#1127)

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
This commit is contained in:
Marcus Holl 2020-02-12 10:12:58 +01:00 committed by GitHub
parent 321f8fbbc1
commit 38652eed04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,21 +4,23 @@ import (
"io"
)
type execRunner interface {
RunExecutable(e string, p ...string) error
type runner interface {
Dir(d string)
Stdout(out io.Writer)
Stderr(err io.Writer)
}
type execRunner interface {
runner
RunExecutable(e string, p ...string) error
}
type envExecRunner interface {
execRunner
Env(e []string)
}
type shellRunner interface {
runner
RunShell(s string, c string) error
Dir(d string)
Stdout(out io.Writer)
Stderr(err io.Writer)
}