Export ExitStatus init func

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2019-04-04 17:46:16 -04:00
parent 4edc7336a2
commit 10cf21dcf7

View File

@ -52,6 +52,15 @@ type Process interface {
Status(context.Context) (Status, error)
}
// NewExitStatus populates an ExitStatus
func NewExitStatus(code uint32, t time.Time, err error) *ExitStatus {
return &ExitStatus{
code: code,
exitedAt: t,
err: err,
}
}
// ExitStatus encapsulates a process' exit status.
// It is used by `Wait()` to return either a process exit code or an error
type ExitStatus struct {