Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
vierbergenlars committed Jan 28, 2021
1 parent 6da4b81 commit af37cc1
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,21 +189,21 @@ func (collector *bareosMetrics) collectLastJob(ch chan<- prometheus.Metric, jobI
var bareosTerminationStates, bareosTerminationStatesErr = collector.connection.JobStates()

if bareosTerminationStatesErr != nil {
log.WithFields(log.Fields{
"job": jobInfo,
"method": "JobStates",
}).Error(bareosTerminationStatesErr)
log.WithFields(log.Fields{
"job": jobInfo,
"method": "JobStates",
}).Error(bareosTerminationStatesErr)
} else {
for _, terminationState := range bareosTerminationStates {
var state = float64(0)
if lastJob != nil {
if terminationState == lastJob.JobStatus {
state = 1
}
}
for _, terminationState := range bareosTerminationStates {
var state = float64(0)
if lastJob != nil {
if terminationState == lastJob.JobStatus {
state = 1
}
}

ch <- prometheus.MustNewConstMetric(collector.LastJobStatus, prometheus.CounterValue, state, labels.newAppend(terminationState)...)
ch <- prometheus.MustNewConstMetric(collector.LastJobStatus, prometheus.CounterValue, state, labels.newAppend(terminationState)...)

}
}
}
}

0 comments on commit af37cc1

Please sign in to comment.