Skip to content

Commit

Permalink
Remove workaround for pre go1.15 (#1010)
Browse files Browse the repository at this point in the history
Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>
  • Loading branch information
johejo committed Mar 27, 2022
1 parent 3bc8f2c commit 8dfa334
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 60 deletions.
4 changes: 2 additions & 2 deletions prometheus/collectors/dbstats_collector.go
Expand Up @@ -101,7 +101,7 @@ func (c *dbStatsCollector) Describe(ch chan<- *prometheus.Desc) {
ch <- c.waitDuration
ch <- c.maxIdleClosed
ch <- c.maxLifetimeClosed
c.describeNewInGo115(ch)
ch <- c.maxIdleTimeClosed
}

// Collect implements Collector.
Expand All @@ -115,5 +115,5 @@ func (c *dbStatsCollector) Collect(ch chan<- prometheus.Metric) {
ch <- prometheus.MustNewConstMetric(c.waitDuration, prometheus.CounterValue, stats.WaitDuration.Seconds())
ch <- prometheus.MustNewConstMetric(c.maxIdleClosed, prometheus.CounterValue, float64(stats.MaxIdleClosed))
ch <- prometheus.MustNewConstMetric(c.maxLifetimeClosed, prometheus.CounterValue, float64(stats.MaxLifetimeClosed))
c.collectNewInGo115(ch, stats)
ch <- prometheus.MustNewConstMetric(c.maxIdleTimeClosed, prometheus.CounterValue, float64(stats.MaxIdleTimeClosed))
}
31 changes: 0 additions & 31 deletions prometheus/collectors/dbstats_collector_go115.go

This file was deleted.

27 changes: 0 additions & 27 deletions prometheus/collectors/dbstats_collector_pre_go115.go

This file was deleted.

0 comments on commit 8dfa334

Please sign in to comment.