forked from mirror/client_golang
Changed example sources according to the basic documentation example
This commit is contained in:
parent
473bcd5aa1
commit
17f1add33c
|
@ -18,6 +18,7 @@ package main
|
|||
|
||||
import (
|
||||
"flag"
|
||||
"log"
|
||||
"math"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
|
@ -99,5 +100,5 @@ func main() {
|
|||
|
||||
// Expose the registered metrics via HTTP.
|
||||
http.Handle("/metrics", prometheus.Handler())
|
||||
http.ListenAndServe(*addr, nil)
|
||||
log.Fatal(http.ListenAndServe(*addr, nil))
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ package main
|
|||
|
||||
import (
|
||||
"flag"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
@ -26,5 +27,5 @@ var addr = flag.String("listen-address", ":8080", "The address to listen on for
|
|||
func main() {
|
||||
flag.Parse()
|
||||
http.Handle("/metrics", prometheus.Handler())
|
||||
http.ListenAndServe(*addr, nil)
|
||||
log.Fatal(http.ListenAndServe(*addr, nil))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue