fix: adjust some code structure to satisfy linter
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful

This commit is contained in:
Tom Neuber 2025-04-18 15:31:05 +02:00
parent 7b30a04933
commit 4060ec09c4
Signed by: tom
GPG key ID: F17EFE4272D89FF6
7 changed files with 38 additions and 31 deletions

View file

@ -1,7 +1,7 @@
package exporter
import (
"log"
"log/slog"
"github.com/prometheus/client_golang/prometheus"
)
@ -95,7 +95,7 @@ func (m *Metrics) collectCurrentlyCachedMetric() {
func (m *Metrics) collectDatabaseTimestampMetric() {
timestamp, err := m.exporter.database.Timestamp()
if err != nil {
log.Printf("failed to read file timestamp: %v", err)
slog.Warn("failed to read file timestamp", "error", err)
return
}