[docs] enhanced the basic example

To protect people from starting their exporter multiple times, one has to
evaluate the error returned by http.ListenAndServe().
This commit is contained in:
Marcus Franke 2016-11-02 10:48:36 +01:00
parent 3fb8ace93b
commit 473bcd5aa1
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@
// // The Handler function provides a default handler to expose metrics
// // via an HTTP server. "/metrics" is the usual endpoint for that.
// http.Handle("/metrics", promhttp.Handler())
// http.ListenAndServe(":8080", nil)
// log.Fatal(http.ListenAndServe(":8080", nil))
// }
//
//