github.com/cookieai-jar/moby@v17.12.1-ce-rc2+incompatible/api/server/router/debug/debug_routes.go (about)

     1  package debug
     2  
     3  import (
     4  	"net/http"
     5  	"net/http/pprof"
     6  
     7  	"golang.org/x/net/context"
     8  )
     9  
    10  func handlePprof(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
    11  	pprof.Handler(vars["name"]).ServeHTTP(w, r)
    12  	return nil
    13  }