aboutsummaryrefslogtreecommitdiff
path: root/job/utils.go
diff options
context:
space:
mode:
authorJulien Dessaux2020-02-20 12:41:47 +0100
committerJulien Dessaux2020-02-20 12:41:47 +0100
commite7456142a9a56866783bca22df8068d04413db48 (patch)
tree22aa6f155964f8261c5f9368c45702881ba682fe /job/utils.go
parentFixed code that used the wrong path manipulation module (diff)
downloadbareos-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.go1
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)