Commit c4da6101 authored by JBD's avatar JBD

doc: make it clear which pprof package is used

Updates #22027.

Change-Id: I5a5bae77a744c7a2ecb75172846e6461a98ee8af
Reviewed-on: https://go-review.googlesource.com/83916Reviewed-by: default avatarAndrew Bonventre <andybons@golang.org>
parent 513a4691
......@@ -185,9 +185,19 @@ handler on :7777 at /custom_debug_path/profile:
<p>
<pre>
mux := http.NewServeMux()
mux.HandleFunc("/custom_debug_path/profile", pprof.Profile)
http.ListenAndServe(":7777", mux)
package main
import (
"log"
"net/http"
"net/http/pprof"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/custom_debug_path/profile", pprof.Profile)
log.Fatal(http.ListenAndServe(":7777", mux))
}
</pre>
</p>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment