renamed New() returns execer instead of interface

This commit is contained in:
Cedric Meury
2018-03-27 00:03:04 +02:00
parent 7f90415689
commit baba83b124
5 changed files with 30 additions and 54 deletions
+2 -2
View File
@@ -15,9 +15,9 @@ type Runner interface {
Execute(cmd string, args []string) ([]byte, error)
}
type CliRunner struct{}
type ShellRunner struct{}
func (cli CliRunner) Execute(cmd string, args []string) ([]byte, error) {
func (shell ShellRunner) Execute(cmd string, args []string) ([]byte, error) {
dir, err := ioutil.TempDir("", tmpPrefix+cmd+tmpSuffix)
if err != nil {
return nil, err