Skip to content

Commit 3142934

Browse files
committed
Rename symbols
Signed-off-by: Felix Yuan <[email protected]>
1 parent 20685a3 commit 3142934

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

collector/pg_connections_by_client.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,28 +68,28 @@ func (c PGConnectionByClientCollector) Update(ctx context.Context, instance *ins
6868
return err
6969
}
7070
defer rows.Close()
71-
var clientCount sql.NullInt64
72-
var clientName sql.NullString
71+
var count sql.NullInt64
72+
var name sql.NullString
7373

7474
for rows.Next() {
75-
if err := rows.Scan(&clientCount, &clientName); err != nil {
75+
if err := rows.Scan(&count, &name); err != nil {
7676
return err
7777
}
7878

79-
if !clientName.Valid {
79+
if !name.Valid {
8080
continue
8181
}
8282

8383
countMetric := 0.0
84-
if clientCount.Valid {
85-
countMetric = float64(clientCount.Int64)
84+
if count.Valid {
85+
countMetric = float64(count.Int64)
8686
}
8787

8888
ch <- prometheus.MustNewConstMetric(
8989
pgClientCountDesc,
9090
prometheus.GaugeValue,
9191
countMetric,
92-
clientName.String,
92+
name.String,
9393
)
9494
}
9595
if err := rows.Err(); err != nil {

0 commit comments

Comments
 (0)