title: golang - net/http/pprof doesn't work
body: <p>I have customer http service:</p>
  
  <pre><code>    s := &amp;http.Server{
              Addr:         config.Port,
              Handler:      Controller.Log(http.DefaultServeMux),
              ReadTimeout:  3 * time.Second,
              WriteTimeout: 3 * time.Second,
      }
  
      http.HandleFunc("/exapmle/router/", exampleFunc)
  
      err := s.ListenAndServe()
      if err != nil {
              log.Critical(err)
              os.Exit(1)
      }
  </code></pre>
  
  <p>It's does't work:</p>
  
  <pre><code>go tool pprof http://localhost:8201/debug/pprof/profile
  </code></pre>
  
  <p>return error:</p>
  
  <pre><code>Failed to fetch http://localhost:8201/debug/pprof/profile?seconds=30
  </code></pre>
  
  <p>Thanks.</p>
  
  <p>edit:
  I think the problem is i rewrite default http server, net/http/pprof package inject http handler:</p>
  
  <pre><code>func init() {
      http.Handle("/debug/pprof/", http.HandlerFunc(Index))
      http.Handle("/debug/pprof/cmdline", http.HandlerFunc(Cmdline))
      http.Handle("/debug/pprof/profile", http.HandlerFunc(Profile))
      http.Handle("/debug/pprof/symbol", http.HandlerFunc(Symbol))
  }
  </code></pre>
  
  <p>the handler does not work in my code.</p>