From: JBD Date: Wed, 13 Dec 2017 23:57:46 +0000 (-0800) Subject: doc: make it clear which pprof package is used X-Git-Tag: go1.10beta2~108 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c4da610197a9e20f6b3cf28a0102fc00378af680;p=gostls13.git 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 --- diff --git a/doc/diagnostics.html b/doc/diagnostics.html index 7a37dd98e4..f9d230e6bc 100644 --- a/doc/diagnostics.html +++ b/doc/diagnostics.html @@ -185,9 +185,19 @@ handler on :7777 at /custom_debug_path/profile:

-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))
+}