Skip to content

Commit

Permalink
Introduce NewExecError function (#2272)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
e-sumin and mergify[bot] authored Aug 22, 2023
1 parent 7076e1e commit f4aabaf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/kube/pod_command_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ type ExecError struct {
stderr LogTail
}

// NewExecError creates an instance of ExecError
func NewExecError(err error, stdout, stderr LogTail) *ExecError {
return &ExecError{
error: err,
stdout: stdout,
stderr: stderr,
}
}

func (e *ExecError) Unwrap() error {
return e.error
}
Expand Down

0 comments on commit f4aabaf

Please sign in to comment.