From 473bcd5aa16d568b328fece4a46c1535bf981cb4 Mon Sep 17 00:00:00 2001 From: Marcus Franke Date: Wed, 2 Nov 2016 10:48:36 +0100 Subject: [PATCH] [docs] enhanced the basic example To protect people from starting their exporter multiple times, one has to evaluate the error returned by http.ListenAndServe(). --- prometheus/doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prometheus/doc.go b/prometheus/doc.go index b15a2d3..618c4de 100644 --- a/prometheus/doc.go +++ b/prometheus/doc.go @@ -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)) // } // //