use http.DefaultServeMux to support pprof

Signed-off-by: davinlu <davinlu@tencent.com>
This commit is contained in:
davinlu 2021-08-16 22:23:45 +08:00
parent ef6627b9f0
commit f4fe58dcf2

View file

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