Skip to content

Commit 8dfa334

Browse files
authored
Remove workaround for pre go1.15 (#1010)
Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>
1 parent 3bc8f2c commit 8dfa334

File tree

3 files changed

+2
-60
lines changed

3 files changed

+2
-60
lines changed

prometheus/collectors/dbstats_collector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (c *dbStatsCollector) Describe(ch chan<- *prometheus.Desc) {
101101
ch <- c.waitDuration
102102
ch <- c.maxIdleClosed
103103
ch <- c.maxLifetimeClosed
104-
c.describeNewInGo115(ch)
104+
ch <- c.maxIdleTimeClosed
105105
}
106106

107107
// Collect implements Collector.
@@ -115,5 +115,5 @@ func (c *dbStatsCollector) Collect(ch chan<- prometheus.Metric) {
115115
ch <- prometheus.MustNewConstMetric(c.waitDuration, prometheus.CounterValue, stats.WaitDuration.Seconds())
116116
ch <- prometheus.MustNewConstMetric(c.maxIdleClosed, prometheus.CounterValue, float64(stats.MaxIdleClosed))
117117
ch <- prometheus.MustNewConstMetric(c.maxLifetimeClosed, prometheus.CounterValue, float64(stats.MaxLifetimeClosed))
118-
c.collectNewInGo115(ch, stats)
118+
ch <- prometheus.MustNewConstMetric(c.maxIdleTimeClosed, prometheus.CounterValue, float64(stats.MaxIdleTimeClosed))
119119
}

prometheus/collectors/dbstats_collector_go115.go

Lines changed: 0 additions & 31 deletions
This file was deleted.

prometheus/collectors/dbstats_collector_pre_go115.go

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)