Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenz Kästle committed Jul 8, 2024
1 parent 9534db4 commit 1d6ee7b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
16 changes: 8 additions & 8 deletions cmd/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ inactive = 0`,
counterFiring++
}

sc1 := result.NewPartialResult()
sc := result.NewPartialResult()

sc1.SetState(rl.GetStatus())
sc1.Output = rl.GetOutput()
overall.AddSubcheck(sc1)
_ = sc.SetState(rl.GetStatus())
sc.Output = rl.GetOutput()
overall.AddSubcheck(sc)
}

// Handle active alerts
Expand All @@ -120,13 +120,13 @@ inactive = 0`,
counterFiring++
}

sc1 := result.NewPartialResult()
sc := result.NewPartialResult()

sc1.SetState(rl.GetStatus())
_ = sc.SetState(rl.GetStatus())
// Set the alert in the internal Type to generate the output
rl.Alert = alert
sc1.Output = rl.GetOutput()
overall.AddSubcheck(sc1)
sc.Output = rl.GetOutput()
overall.AddSubcheck(sc)
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Ready: Checks the readiness of an endpoint, which returns OK if the Prometheus s

partialResult := result.NewPartialResult()

partialResult.SetState(rc)
_ = partialResult.SetState(rc)
partialResult.Output = output
overall.AddSubcheck(partialResult)

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

partialResult.SetState(rc)
_ = partialResult.SetState(rc)

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

partialResult := result.NewPartialResult()
partialResult.SetState(rc)
_ = partialResult.SetState(rc)
partialResult.Output = output
overall.AddSubcheck(partialResult)

Expand Down
12 changes: 6 additions & 6 deletions cmd/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ Note: Time range values e.G. 'go_memstats_alloc_bytes_total[0s]' only the latest
partial := goresult.NewPartialResult()

if crit.DoesViolate(numberValue) {
partial.SetState(check.Critical)
_ = partial.SetState(check.Critical)
} else if warn.DoesViolate(numberValue) {
partial.SetState(check.Warning)
_ = partial.SetState(check.Warning)
} else {
partial.SetState(check.OK)
_ = partial.SetState(check.OK)
}

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

if crit.DoesViolate(numberValue) {
partial.SetState(check.Critical)
_ = partial.SetState(check.Critical)
} else if warn.DoesViolate(numberValue) {
partial.SetState(check.Warning)
_ = partial.SetState(check.Warning)
} else {
partial.SetState(check.OK)
_ = partial.SetState(check.OK)
}

// Format the metric and RC output for console output
Expand Down

0 comments on commit 1d6ee7b

Please sign in to comment.