mirror of
https://github.com/helmfile/helmfile.git
synced 2026-09-30 20:33:16 +02:00
code style
This commit is contained in:
+3
-3
@@ -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) {
|
||||
|
||||
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user