Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolai Vaganov <[email protected]>
  • Loading branch information
Electronn committed Sep 23, 2024
1 parent 4b1397d commit 2c5c3ec
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions collector/pg_wal.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package collector

import (
"context"
"database/sql"
"database/sql"
"github.com/prometheus/client_golang/prometheus"
)

Expand Down Expand Up @@ -74,18 +74,18 @@ func (c PGWALCollector) Update(ctx context.Context, instance *instance, ch chan<
}

var segmentsValue float64
if segments.Valid {
segmentsValue = float64(segments.Int64)
} else {
segmentsValue = 0
if segments.Valid {
segmentsValue = float64(segments.Int64)
} else {
segmentsValue = 0
}

var sizeValue float64
if size.Valid {
sizeValue = float64(size.Int64)
} else {
sizeValue = 0
}
var sizeValue float64
if size.Valid {
sizeValue = float64(size.Int64)
} else {
sizeValue = 0
}

ch <- prometheus.MustNewConstMetric(
pgWALSegments,
Expand Down

0 comments on commit 2c5c3ec

Please sign in to comment.