15 lines
255 B
Go
15 lines
255 B
Go
package exec
|
|
|
|
import "fmt"
|
|
|
|
var _ error = (*Error)(nil)
|
|
|
|
type Error struct {
|
|
ExitCode int
|
|
Message string
|
|
StdErr []byte
|
|
}
|
|
|
|
func (e Error) Error() string {
|
|
return fmt.Sprintf("command exited with code %d: %s - %s", e.ExitCode, e.Message, e.StdErr)
|
|
}
|