23 lines
396 B
Go
23 lines
396 B
Go
![]() |
package helm
|
||
|
|
||
|
import (
|
||
|
"os/exec"
|
||
|
)
|
||
|
|
||
|
type HelmCommand struct {
|
||
|
Bin string
|
||
|
Exec func(string,...string) commandExecutor
|
||
|
}
|
||
|
|
||
|
////
|
||
|
type commandExecutor interface {
|
||
|
Output() ([]byte, error)
|
||
|
CombinedOutput() ([]byte, error)
|
||
|
}
|
||
|
|
||
|
func (this *HelmCommand) New() {
|
||
|
this.Exec = func(name string, arg ...string) commandExecutor {
|
||
|
return exec.Command(name, arg...)
|
||
|
}
|
||
|
}
|