From 10cf21dcf72e0f192e6364c4ff6aa9eecc7cdc48 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 4 Apr 2019 17:46:16 -0400 Subject: [PATCH] Export ExitStatus init func Signed-off-by: Michael Crosby --- process.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/process.go b/process.go index 42f3b84a9..14732d99b 100644 --- a/process.go +++ b/process.go @@ -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 {