Skip to content

Commit 1d6ee7b

Browse files
author
Lorenz Kästle
committed
make linter happy
1 parent 9534db4 commit 1d6ee7b

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

cmd/alert.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ inactive = 0`,
9999
counterFiring++
100100
}
101101

102-
sc1 := result.NewPartialResult()
102+
sc := result.NewPartialResult()
103103

104-
sc1.SetState(rl.GetStatus())
105-
sc1.Output = rl.GetOutput()
106-
overall.AddSubcheck(sc1)
104+
_ = sc.SetState(rl.GetStatus())
105+
sc.Output = rl.GetOutput()
106+
overall.AddSubcheck(sc)
107107
}
108108

109109
// Handle active alerts
@@ -120,13 +120,13 @@ inactive = 0`,
120120
counterFiring++
121121
}
122122

123-
sc1 := result.NewPartialResult()
123+
sc := result.NewPartialResult()
124124

125-
sc1.SetState(rl.GetStatus())
125+
_ = sc.SetState(rl.GetStatus())
126126
// Set the alert in the internal Type to generate the output
127127
rl.Alert = alert
128-
sc1.Output = rl.GetOutput()
129-
overall.AddSubcheck(sc1)
128+
sc.Output = rl.GetOutput()
129+
overall.AddSubcheck(sc)
130130
}
131131
}
132132
}

cmd/health.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Ready: Checks the readiness of an endpoint, which returns OK if the Prometheus s
4848

4949
partialResult := result.NewPartialResult()
5050

51-
partialResult.SetState(rc)
51+
_ = partialResult.SetState(rc)
5252
partialResult.Output = output
5353
overall.AddSubcheck(partialResult)
5454

@@ -63,7 +63,7 @@ Ready: Checks the readiness of an endpoint, which returns OK if the Prometheus s
6363
}
6464
partialResult := result.NewPartialResult()
6565

66-
partialResult.SetState(rc)
66+
_ = partialResult.SetState(rc)
6767

6868
partialResult.Output = "Prometheus Server information\n\n" +
6969
"Version: " + info.Version + "\n" +
@@ -85,7 +85,7 @@ Ready: Checks the readiness of an endpoint, which returns OK if the Prometheus s
8585
}
8686

8787
partialResult := result.NewPartialResult()
88-
partialResult.SetState(rc)
88+
_ = partialResult.SetState(rc)
8989
partialResult.Output = output
9090
overall.AddSubcheck(partialResult)
9191

cmd/query.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ Note: Time range values e.G. 'go_memstats_alloc_bytes_total[0s]' only the latest
119119
partial := goresult.NewPartialResult()
120120

121121
if crit.DoesViolate(numberValue) {
122-
partial.SetState(check.Critical)
122+
_ = partial.SetState(check.Critical)
123123
} else if warn.DoesViolate(numberValue) {
124-
partial.SetState(check.Warning)
124+
_ = partial.SetState(check.Warning)
125125
} else {
126-
partial.SetState(check.OK)
126+
_ = partial.SetState(check.OK)
127127
}
128128

129129
// Format the metric and RC output for console output
@@ -155,11 +155,11 @@ Note: Time range values e.G. 'go_memstats_alloc_bytes_total[0s]' only the latest
155155
partial := goresult.NewPartialResult()
156156

157157
if crit.DoesViolate(numberValue) {
158-
partial.SetState(check.Critical)
158+
_ = partial.SetState(check.Critical)
159159
} else if warn.DoesViolate(numberValue) {
160-
partial.SetState(check.Warning)
160+
_ = partial.SetState(check.Warning)
161161
} else {
162-
partial.SetState(check.OK)
162+
_ = partial.SetState(check.OK)
163163
}
164164

165165
// Format the metric and RC output for console output

0 commit comments

Comments
 (0)