debug/debug.go
func Wrap(handler http.Handler) http.Handler {
	mux := http.NewServeMux()
	mux.HandleFunc("/debug/pprof/", pprof.Index)
	mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
	mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
	mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
	mux.HandleFunc("/debug/pprof/block", blockHandler)
	mux.HandleFunc("/debug/vars", expvarHandler)
	mux.HandleFunc("/debug/gc", performGC)
	mux.Handle("/", handler)
	return mux
}
func Wrap(handler http.Handler) http.Handler {
	mux := http.NewServeMux()
	mux.HandleFunc("/debug/pprof/", pprof.Index)
	mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
	mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
	mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
	mux.HandleFunc("/debug/pprof/block", blockHandler)
	mux.HandleFunc("/debug/vars", expvarHandler)
	mux.HandleFunc("/debug/gc", performGC)
	mux.Handle("/", handler)
	return mux
}
func Wrap ( handler http . Handler ) http . Handler { mux := http . NewServeMux ( ) mux . HandleFunc ( " " , pprof . Index ) mux . HandleFunc ( " " , pprof . Cmdline ) mux . HandleFunc ( " " , pprof . Profile ) mux . HandleFunc ( " " , pprof . Symbol ) mux . HandleFunc ( " " , blockHandler ) mux . HandleFunc ( " " , expvarHandler ) mux . HandleFunc ( " " , performGC ) mux . Handle ( " " , handler ) return mux }
// Wrap returns a handler which adds the following URLs as special cases:
//
//     /debug/pprof/        -- an HTML index of pprof endpoints
//     /debug/pprof/cmdline -- the running process's command line
//     /debug/pprof/profile -- pprof profiling endpoint
//     /debug/pprof/symbol  -- pprof debugging symbols
//     /debug/vars          -- JSON-formatted expvars
Wrap returns a handler which adds the following URLs as special cases : / debug / pprof / -- an HTML index of pprof endpoints / debug / pprof / cmdline -- the running process s command line / debug / pprof / profile -- pprof profiling endpoint / debug / pprof / symbol -- pprof debugging symbols / debug / vars -- JSON - formatted expvars