util: use FatalLog() in util/httpserver.go

Hide the use of klog by using our own FatalLog() function.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-08-07 09:30:48 +02:00 committed by mergify[bot]
parent ab033f85df
commit 61924adf57

View File

@ -7,7 +7,6 @@ import (
"strconv" "strconv"
"github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/client_golang/prometheus/promhttp"
klog "k8s.io/klog/v2"
) )
// ValidateURL validates the url. // ValidateURL validates the url.
@ -22,6 +21,6 @@ func StartMetricsServer(c *Config) {
http.Handle(c.MetricsPath, promhttp.Handler()) http.Handle(c.MetricsPath, promhttp.Handler())
err := http.ListenAndServe(addr, nil) err := http.ListenAndServe(addr, nil)
if err != nil { if err != nil {
klog.Fatalln(err) FatalLog("failed to listen on address %v: %s", addr, err)
} }
} }