code style
This commit is contained in:
parent
915c190901
commit
7f90415689
|
|
@ -11,7 +11,7 @@ const (
|
|||
)
|
||||
|
||||
type execer struct {
|
||||
runner Runner
|
||||
runner Runner
|
||||
writer io.Writer
|
||||
kubeContext string
|
||||
extra []string
|
||||
|
|
@ -21,7 +21,7 @@ func NewHelmExec(writer io.Writer, kubeContext string) Interface {
|
|||
return &execer{
|
||||
writer: writer,
|
||||
kubeContext: kubeContext,
|
||||
runner: new(CliRunner),
|
||||
runner: new(CliRunner),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -108,4 +108,4 @@ func (helm *execer) getKubeContent() string {
|
|||
}
|
||||
func (helm *execer) getWriter() io.Writer {
|
||||
return helm.writer
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
type MockRunner struct {
|
||||
output []byte
|
||||
err error
|
||||
err error
|
||||
}
|
||||
|
||||
func (mock *MockRunner) Execute(cmd string, args []string) ([]byte, error) {
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ type Runner interface {
|
|||
Execute(cmd string, args []string) ([]byte, error)
|
||||
}
|
||||
|
||||
type CliRunner struct {}
|
||||
type CliRunner struct{}
|
||||
|
||||
func (cli CliRunner) Execute(cmd string, args []string) ([]byte, error) {
|
||||
dir, err := ioutil.TempDir("", tmpPrefix + cmd + tmpSuffix)
|
||||
dir, err := ioutil.TempDir("", tmpPrefix+cmd+tmpSuffix)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue