Move errors to commander.go

master
Ivan Klymenchenko 3 years ago
parent 9b16ddcb61
commit e306881d65

@ -1,11 +1,21 @@
package main
import (
"fmt"
"log"
"os/exec"
"strings"
)
type ShellError struct {
Command string
Err error
}
func (e *ShellError) Error() string {
return fmt.Sprintf("Cannot run %q. Error %v", e.Command, e.Err)
}
type Commander interface {
Exec(cmd *exec.Cmd) (string, error)
ExecSilently(cmd *exec.Cmd) error

@ -1,12 +0,0 @@
package main
import "fmt"
type ShellError struct {
Command string
Err error
}
func (e *ShellError) Error() string {
return fmt.Sprintf("Cannot run %q. Error %v", e.Command, e.Err)
}
Loading…
Cancel
Save