Skip to content

Commit 6d78609

Browse files
committed
Lint fixes
Signed-off-by: Felix Yuan <[email protected]>
1 parent 26d98e9 commit 6d78609

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

collector/pg_long_running_transactions_marginalia.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,16 @@ func (PGLongRunningTransactionsMarginaliaCollector) Update(ctx context.Context,
7474

7575
for rows.Next() {
7676
var application, endpoint string
77-
var max_age_in_seconds float64
77+
var maxAgeInSeconds float64
7878

79-
if err := rows.Scan(&application, &endpoint, &max_age_in_seconds); err != nil {
79+
if err := rows.Scan(&application, &endpoint, &maxAgeInSeconds); err != nil {
8080
return err
8181
}
8282

8383
ch <- prometheus.MustNewConstMetric(
84-
longRunningTransactionsAgeInSeconds,
84+
longRunningTransactionsMarginaliaMaxAgeInSeconds,
8585
prometheus.GaugeValue,
86-
max_age_in_seconds,
86+
maxAgeInSeconds,
8787
application, endpoint,
8888
)
8989
}

collector/pg_stat_activity_autovacuum_active.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ func (PGStatActivityAutovacuumActiveCollector) Update(ctx context.Context, insta
7070

7171
for rows.Next() {
7272
var phase, mode string
73-
var workers_count float64
73+
var workersCount float64
7474

75-
if err := rows.Scan(&phase, &mode, &workers_count); err != nil {
75+
if err := rows.Scan(&phase, &mode, &workersCount); err != nil {
7676
return err
7777
}
7878

7979
ch <- prometheus.MustNewConstMetric(
8080
statActivityAutovacuumActiveWorkersCount,
8181
prometheus.GaugeValue,
82-
workers_count,
82+
workersCount,
8383
phase, mode,
8484
)
8585
}

collector/pg_stat_activity_marginalia.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,24 +86,24 @@ func (PGStatActivityMarginaliaCollector) Update(ctx context.Context, instance *i
8686
defer rows.Close()
8787

8888
for rows.Next() {
89-
var usename, application, endpoint, command, state, wait_event, wait_event_type string
90-
var count, max_tx_age float64
89+
var usename, application, endpoint, command, state, waitEvent, waitEventType string
90+
var count, maxTxAge float64
9191

92-
if err := rows.Scan(&usename, &application, &endpoint, &command, &state, &wait_event, &wait_event_type, &count, &max_tx_age); err != nil {
92+
if err := rows.Scan(&usename, &application, &endpoint, &command, &state, &waitEvent, &waitEventType, &count, &maxTxAge); err != nil {
9393
return err
9494
}
9595

9696
ch <- prometheus.MustNewConstMetric(
9797
statActivityMarginaliaActiveCount,
9898
prometheus.GaugeValue,
9999
count,
100-
usename, application, endpoint, command, state, wait_event, wait_event_type,
100+
usename, application, endpoint, command, state, waitEvent, waitEventType,
101101
)
102102
ch <- prometheus.MustNewConstMetric(
103103
statActivityMarginaliaMaxTxAgeInSeconds,
104104
prometheus.GaugeValue,
105-
max_tx_age,
106-
usename, application, endpoint, command, state, wait_event, wait_event_type,
105+
maxTxAge,
106+
usename, application, endpoint, command, state, waitEvent, waitEventType,
107107
)
108108
}
109109
if err := rows.Err(); err != nil {

0 commit comments

Comments
 (0)