use promhttp.Handler()

allows the removal of SA1019 linter ignore
This commit is contained in:
Rob Best
2019-12-08 19:33:49 +00:00
parent 0ec420e918
commit 6d5223cb4b

View File

@@ -375,8 +375,7 @@ func main() {
log.Infoln("Starting "+namespace+"_exporter", version.Info())
log.Infoln("Build context", version.BuildContext())
//lint:ignore SA1019 because
http.Handle(*metricsPath, prometheus.Handler())
http.Handle(*metricsPath, promhttp.Handler())
http.HandleFunc(*probePath, func(w http.ResponseWriter, r *http.Request) {
probeHandler(w, r, tlsConfig)
})