mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-08 02:01:31 +02:00
renamed New() returns execer instead of interface
This commit is contained in:
+2
-16
@@ -17,11 +17,11 @@ type execer struct {
|
||||
extra []string
|
||||
}
|
||||
|
||||
func NewHelmExec(writer io.Writer, kubeContext string) Interface {
|
||||
func New(writer io.Writer, kubeContext string) *execer {
|
||||
return &execer{
|
||||
writer: writer,
|
||||
kubeContext: kubeContext,
|
||||
runner: new(CliRunner),
|
||||
runner: &ShellRunner{},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,17 +95,3 @@ func (helm *execer) exec(args ...string) ([]byte, error) {
|
||||
}
|
||||
return helm.runner.Execute(command, cmdargs)
|
||||
}
|
||||
|
||||
// for unit testing
|
||||
func (helm *execer) setRunner(runner Runner) {
|
||||
helm.runner = runner
|
||||
}
|
||||
func (helm *execer) getExtra() []string {
|
||||
return helm.extra
|
||||
}
|
||||
func (helm *execer) getKubeContent() string {
|
||||
return helm.kubeContext
|
||||
}
|
||||
func (helm *execer) getWriter() io.Writer {
|
||||
return helm.writer
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user