diff options
author | Julien Dessaux | 2020-02-20 12:41:47 +0100 |
---|---|---|
committer | Julien Dessaux | 2020-02-20 12:41:47 +0100 |
commit | e7456142a9a56866783bca22df8068d04413db48 (patch) | |
tree | 22aa6f155964f8261c5f9368c45702881ba682fe /job/utils.go | |
parent | Fixed code that used the wrong path manipulation module (diff) | |
download | bareos-zabbix-check-e7456142a9a56866783bca22df8068d04413db48.tar.gz bareos-zabbix-check-e7456142a9a56866783bca22df8068d04413db48.tar.bz2 bareos-zabbix-check-e7456142a9a56866783bca22df8068d04413db48.zip |
Improved tests for job package
Diffstat (limited to '')
-rw-r--r-- | job/utils.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/job/utils.go b/job/utils.go index 8bbb6eb..33c25cd 100644 --- a/job/utils.go +++ b/job/utils.go @@ -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) |