fix: adjust some code structure to satisfy linter
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/build unknown status

This commit is contained in:
Tom Neuber 2025-04-18 15:31:05 +02:00
parent 7b30a04933
commit 09b4782165
Signed by: tom
GPG key ID: F17EFE4272D89FF6
6 changed files with 37 additions and 30 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
}