Merge pull request #386 from royeo/feature/pprof

use http.DefaultServeMux to support pprof
This commit is contained in:
Matthias Rampke 2021-08-31 12:05:55 +02:00 committed by GitHub
commit e395798230
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -498,7 +498,7 @@ func main() {
} }
} }
mux := http.NewServeMux() mux := http.DefaultServeMux
mux.Handle(*metricsEndpoint, promhttp.Handler()) mux.Handle(*metricsEndpoint, promhttp.Handler())
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`<html> w.Write([]byte(`<html>