Browse code

Add exported status code from a job

This allows the job's status code to be consumed externally so that we
can use it as an exit code or saving to a state file.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)

Michael Crosby authored on 2014/04/24 05:47:56
Showing 1 changed files
... ...
@@ -208,3 +208,7 @@ func (job *Job) Error(err error) Status {
208 208
 	fmt.Fprintf(job.Stderr, "%s\n", err)
209 209
 	return StatusErr
210 210
 }
211
+
212
+func (job *Job) StatusCode() int {
213
+	return int(job.status)
214
+}