From 902ed8e491304b2be98e3fc691a4147c4aad9458 Mon Sep 17 00:00:00 2001 From: Andreas Wirooks Date: Wed, 8 Jul 2020 11:16:48 +0200 Subject: [PATCH] Fix build with go 1.13 --- hpraid_exporter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hpraid_exporter.go b/hpraid_exporter.go index 01e3810..f426364 100644 --- a/hpraid_exporter.go +++ b/hpraid_exporter.go @@ -27,6 +27,7 @@ import ( "sync" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/log" ) @@ -195,7 +196,7 @@ func main() { } prometheus.MustRegister(exporter) - http.Handle(*metricsPath, prometheus.Handler()) + http.Handle(*metricsPath, promhttp.Handler()) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { w.Write([]byte(`