Fix build error

This commit is contained in:
Mustafa Simav 2019-06-18 09:04:16 +03:00
parent b7e842d893
commit 9dcc0d06e7
1 changed files with 5 additions and 3 deletions

View File

@ -27,9 +27,11 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/log"
"sort" "sort"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/common/log"
) )
var ( var (
@ -448,7 +450,7 @@ func main() {
} }
prometheus.MustRegister(exporter) prometheus.MustRegister(exporter)
http.Handle(*metricsPath, prometheus.Handler()) http.Handle(*metricsPath, promhttp.Handler())
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(` w.Write([]byte(`
<html> <html>