Improved tests for job package
This commit is contained in:
parent
211adff0b0
commit
e7456142a9
3 changed files with 83 additions and 35 deletions
|
@ -18,6 +18,7 @@ func KeepOldestOnly(jobs []Job) []Job {
|
|||
|
||||
// KeepSuccessOnly returns only the successful jobs from a job list (suiatble to write a new spool file)
|
||||
func KeepSuccessOnly(jobs []Job) (result []Job) {
|
||||
result = make([]Job, 0)
|
||||
for _, job := range jobs {
|
||||
if job.Success {
|
||||
result = append(result, job)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue