1
0
mirror of https://github.com/golang/go synced 2024-11-11 19:51:37 -07:00

doc: make it clear which pprof package is used

Updates #22027.

Change-Id: I5a5bae77a744c7a2ecb75172846e6461a98ee8af
Reviewed-on: https://go-review.googlesource.com/83916
Reviewed-by: Andrew Bonventre <andybons@golang.org>
This commit is contained in:
JBD 2017-12-13 15:57:46 -08:00
parent 513a469119
commit c4da610197

View File

@ -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>