Skip to content

Commit ac08ee6

Browse files
committed
Go mod tidy and some other fixes
Signed-off-by: Felix Yuan <[email protected]>
1 parent 6ee7013 commit ac08ee6

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

Diff for: collector/replication_slots.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ func (PGReplicationSlotCollector) Update(ctx context.Context, db *sql.DB, ch cha
7070
for rows.Next() {
7171
var slotName string
7272
var walLSN int64
73-
var flusLSN int64
73+
var flushLSN int64
7474
var isActive bool
75-
if err := rows.Scan(&slotName, &walLSN, &flusLSN, &isActive); err != nil {
75+
if err := rows.Scan(&slotName, &walLSN, &flushLSN, &isActive); err != nil {
7676
return err
7777
}
7878

@@ -88,12 +88,12 @@ func (PGReplicationSlotCollector) Update(ctx context.Context, db *sql.DB, ch cha
8888
if isActive {
8989
ch <- prometheus.MustNewConstMetric(
9090
pgReplicationSlotCurrentFlushDesc,
91-
prometheus.GaugeValue, float64(flusLSN), slotName,
91+
prometheus.GaugeValue, float64(flushLSN), slotName,
9292
)
9393
}
9494
ch <- prometheus.MustNewConstMetric(
9595
pgReplicationSlotIsActiveDesc,
96-
prometheus.GaugeValue, float64(flusLSN), slotName,
96+
prometheus.GaugeValue, float64(isActiveValue), slotName,
9797
)
9898
}
9999
if err := rows.Err(); err != nil {

Diff for: go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/prometheus/client_model v0.4.0
1313
github.com/prometheus/common v0.44.0
1414
github.com/prometheus/exporter-toolkit v0.10.0
15-
github.com/smartystreets/goconvey v1.8.0
15+
github.com/smartystreets/goconvey v1.8.0
1616
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
1717
gopkg.in/yaml.v2 v2.4.0
1818
gopkg.in/yaml.v3 v3.0.1
@@ -25,7 +25,7 @@ require (
2525
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
2626
github.com/go-logfmt/logfmt v0.5.1 // indirect
2727
github.com/golang/protobuf v1.5.3 // indirect
28-
github.com/gopherjs/gopherjs v1.17.2 // indirect
28+
github.com/gopherjs/gopherjs v1.17.2 // indirect
2929
github.com/jpillora/backoff v1.0.0 // indirect
3030
github.com/jtolds/gls v4.20.0+incompatible // indirect
3131
github.com/kr/pretty v0.3.1 // indirect
@@ -34,7 +34,7 @@ require (
3434
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
3535
github.com/prometheus/procfs v0.9.0 // indirect
3636
github.com/rogpeppe/go-internal v1.10.0 // indirect
37-
github.com/smartystreets/assertions v1.13.1 // indirect
37+
github.com/smartystreets/assertions v1.13.1 // indirect
3838
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
3939
golang.org/x/crypto v0.8.0 // indirect
4040
golang.org/x/net v0.10.0 // indirect

Diff for: go.sum

+3-2
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,13 @@ github.com/prometheus/exporter-toolkit v0.10.0 h1:yOAzZTi4M22ZzVxD+fhy1URTuNRj/3
5959
github.com/prometheus/exporter-toolkit v0.10.0/go.mod h1:+sVFzuvV5JDyw+Ih6p3zFxZNVnKQa3x5qPmDSiPu4ZY=
6060
github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI=
6161
github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
62+
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
63+
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
64+
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
6265
github.com/smartystreets/assertions v1.13.1 h1:Ef7KhSmjZcK6AVf9YbJdvPYG9avaF0ZxudX+ThRdWfU=
6366
github.com/smartystreets/assertions v1.13.1/go.mod h1:cXr/IwVfSo/RbCSPhoAPv73p3hlSdrBH/b3SdnW/LMY=
6467
github.com/smartystreets/goconvey v1.8.0 h1:Oi49ha/2MURE0WexF052Z0m+BNSGirfjg5RL+JXWq3w=
6568
github.com/smartystreets/goconvey v1.8.0/go.mod h1:EdX8jtrTIj26jmjCOVNMVSIYAtgexqXKHOXW2Dx9JLg=
66-
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
67-
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
6869
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
6970
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
7071
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=

0 commit comments

Comments
 (0)