github.com/rhatdan/docker@v0.7.7-0.20180119204836-47a0dcbcd20a/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  }