Display error of ListenAndServe

This commit is contained in:
Dominik Honnef
2016-12-29 17:26:36 +01:00
parent 05adce1885
commit 5b449e859f
+2 -1
View File
@@ -4,6 +4,7 @@ package main
import (
"flag"
"log"
"net/http"
"strings"
@@ -21,5 +22,5 @@ func main() {
c := nutcollector.New(strings.Fields(*fHosts))
prometheus.MustRegister(c)
http.Handle("/metrics", promhttp.Handler())
http.ListenAndServe(*fListen, nil)
log.Fatal(http.ListenAndServe(*fListen, nil))
}