pprof.go
func Register(r *gin.Engine, prefixOptions ...string) {
	prefix := getPrefix(prefixOptions...)

	prefixRouter := r.Group(prefix)
	{
		prefixRouter.GET("/", pprofHandler(pprof.Index))
		prefixRouter.GET("/cmdline", pprofHandler(pprof.Cmdline))
		prefixRouter.GET("/profile", pprofHandler(pprof.Profile))
		prefixRouter.POST("/symbol", pprofHandler(pprof.Symbol))
		prefixRouter.GET("/symbol", pprofHandler(pprof.Symbol))
		prefixRouter.GET("/trace", pprofHandler(pprof.Trace))
		prefixRouter.GET("/block", pprofHandler(pprof.Handler("block").ServeHTTP))
		prefixRouter.GET("/goroutine", pprofHandler(pprof.Handler("goroutine").ServeHTTP))
		prefixRouter.GET("/heap", pprofHandler(pprof.Handler("heap").ServeHTTP))
		prefixRouter.GET("/mutex", pprofHandler(pprof.Handler("mutex").ServeHTTP))
		prefixRouter.GET("/threadcreate", pprofHandler(pprof.Handler("threadcreate").ServeHTTP))
	}
}
func Register(r *gin.Engine, prefixOptions ...string) {
	prefix := getPrefix(prefixOptions...)

	prefixRouter := r.Group(prefix)
	{
		prefixRouter.GET("/", pprofHandler(pprof.Index))
		prefixRouter.GET("/cmdline", pprofHandler(pprof.Cmdline))
		prefixRouter.GET("/profile", pprofHandler(pprof.Profile))
		prefixRouter.POST("/symbol", pprofHandler(pprof.Symbol))
		prefixRouter.GET("/symbol", pprofHandler(pprof.Symbol))
		prefixRouter.GET("/trace", pprofHandler(pprof.Trace))
		prefixRouter.GET("/block", pprofHandler(pprof.Handler("block").ServeHTTP))
		prefixRouter.GET("/goroutine", pprofHandler(pprof.Handler("goroutine").ServeHTTP))
		prefixRouter.GET("/heap", pprofHandler(pprof.Handler("heap").ServeHTTP))
		prefixRouter.GET("/mutex", pprofHandler(pprof.Handler("mutex").ServeHTTP))
		prefixRouter.GET("/threadcreate", pprofHandler(pprof.Handler("threadcreate").ServeHTTP))
	}
}
func Register ( r * gin . Engine , prefixOptions ... string ) { prefix := getPrefix ( prefixOptions ... ) prefixRouter := r . Group ( prefix ) { prefixRouter . GET ( " " , pprofHandler ( pprof . Index ) ) prefixRouter . GET ( " " , pprofHandler ( pprof . Cmdline ) ) prefixRouter . GET ( " " , pprofHandler ( pprof . Profile ) ) prefixRouter . POST ( " " , pprofHandler ( pprof . Symbol ) ) prefixRouter . GET ( " " , pprofHandler ( pprof . Symbol ) ) prefixRouter . GET ( " " , pprofHandler ( pprof . Trace ) ) prefixRouter . GET ( " " , pprofHandler ( pprof . Handler ( " " ) . ServeHTTP ) ) prefixRouter . GET ( " " , pprofHandler ( pprof . Handler ( " " ) . ServeHTTP ) ) prefixRouter . GET ( " " , pprofHandler ( pprof . Handler ( " " ) . ServeHTTP ) ) prefixRouter . GET ( " " , pprofHandler ( pprof . Handler ( " " ) . ServeHTTP ) ) prefixRouter . GET ( " " , pprofHandler ( pprof . Handler ( " " ) . ServeHTTP ) ) } }
// Register the standard HandlerFuncs from the net/http/pprof package with
// the provided gin.Engine. prefixOptions is a optional. If not prefixOptions,
// the default path prefix is used, otherwise first prefixOptions will be path prefix.
Register the standard HandlerFuncs from the net / http / pprof package with the provided gin . Engine . prefixOptions is a optional . If not prefixOptions the default path prefix is used otherwise first prefixOptions will be path prefix .