Skip to content

Commit

Permalink
Changed example sources according to the basic documentation example
Browse files Browse the repository at this point in the history
  • Loading branch information
Comradin committed Nov 2, 2016
1 parent 473bcd5 commit 17f1add
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/random/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package main

import (
"flag"
"log"
"math"
"math/rand"
"net/http"
Expand Down Expand Up @@ -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))
}
3 changes: 2 additions & 1 deletion examples/simple/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package main

import (
"flag"
"log"
"net/http"

"github.com/prometheus/client_golang/prometheus"
Expand All @@ -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))
}

0 comments on commit 17f1add

Please sign in to comment.