Skip to content

Commit 10cf21d

Browse files
committed
Export ExitStatus init func
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
1 parent 4edc733 commit 10cf21d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

process.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ type Process interface {
5252
Status(context.Context) (Status, error)
5353
}
5454

55+
// NewExitStatus populates an ExitStatus
56+
func NewExitStatus(code uint32, t time.Time, err error) *ExitStatus {
57+
return &ExitStatus{
58+
code: code,
59+
exitedAt: t,
60+
err: err,
61+
}
62+
}
63+
5564
// ExitStatus encapsulates a process' exit status.
5665
// It is used by `Wait()` to return either a process exit code or an error
5766
type ExitStatus struct {

0 commit comments

Comments
 (0)