@@ -7,15 +7,15 @@ import (
77 "github.com/labstack/echo"
88)
99
10- // Wrap adds several routes from package `net/http/pprof` to *echo.Echo object
10+ // Wrap adds several routes from package `net/http/pprof` to *echo.Echo object.
1111func Wrap (e * echo.Echo ) {
1212 WrapGroup ("" , e .Group ("" ))
1313}
1414
15- // Wrapper make sure we are backward compatible
15+ // Wrapper make sure we are backward compatible.
1616var Wrapper = Wrap
1717
18- // WrapGroup adds several routes from package `net/http/pprof` to *echo.Group object
18+ // WrapGroup adds several routes from package `net/http/pprof` to *echo.Group object.
1919func WrapGroup (prefix string , g * echo.Group ) {
2020 routers := []struct {
2121 Method string
@@ -45,79 +45,79 @@ func WrapGroup(prefix string, g *echo.Group) {
4545 }
4646}
4747
48- // IndexHandler will pass the call from /debug/pprof to pprof
48+ // IndexHandler will pass the call from /debug/pprof to pprof.
4949func IndexHandler () echo.HandlerFunc {
5050 return func (ctx echo.Context ) error {
5151 pprof .Index (ctx .Response ().Writer , ctx .Request ())
5252 return nil
5353 }
5454}
5555
56- // HeapHandler will pass the call from /debug/pprof/heap to pprof
56+ // HeapHandler will pass the call from /debug/pprof/heap to pprof.
5757func HeapHandler () echo.HandlerFunc {
5858 return func (ctx echo.Context ) error {
5959 pprof .Handler ("heap" ).ServeHTTP (ctx .Response (), ctx .Request ())
6060 return nil
6161 }
6262}
6363
64- // GoroutineHandler will pass the call from /debug/pprof/goroutine to pprof
64+ // GoroutineHandler will pass the call from /debug/pprof/goroutine to pprof.
6565func GoroutineHandler () echo.HandlerFunc {
6666 return func (ctx echo.Context ) error {
6767 pprof .Handler ("goroutine" ).ServeHTTP (ctx .Response ().Writer , ctx .Request ())
6868 return nil
6969 }
7070}
7171
72- // BlockHandler will pass the call from /debug/pprof/block to pprof
72+ // BlockHandler will pass the call from /debug/pprof/block to pprof.
7373func BlockHandler () echo.HandlerFunc {
7474 return func (ctx echo.Context ) error {
7575 pprof .Handler ("block" ).ServeHTTP (ctx .Response ().Writer , ctx .Request ())
7676 return nil
7777 }
7878}
7979
80- // ThreadCreateHandler will pass the call from /debug/pprof/threadcreate to pprof
80+ // ThreadCreateHandler will pass the call from /debug/pprof/threadcreate to pprof.
8181func ThreadCreateHandler () echo.HandlerFunc {
8282 return func (ctx echo.Context ) error {
8383 pprof .Handler ("threadcreate" ).ServeHTTP (ctx .Response ().Writer , ctx .Request ())
8484 return nil
8585 }
8686}
8787
88- // CmdlineHandler will pass the call from /debug/pprof/cmdline to pprof
88+ // CmdlineHandler will pass the call from /debug/pprof/cmdline to pprof.
8989func CmdlineHandler () echo.HandlerFunc {
9090 return func (ctx echo.Context ) error {
9191 pprof .Cmdline (ctx .Response ().Writer , ctx .Request ())
9292 return nil
9393 }
9494}
9595
96- // ProfileHandler will pass the call from /debug/pprof/profile to pprof
96+ // ProfileHandler will pass the call from /debug/pprof/profile to pprof.
9797func ProfileHandler () echo.HandlerFunc {
9898 return func (ctx echo.Context ) error {
9999 pprof .Profile (ctx .Response ().Writer , ctx .Request ())
100100 return nil
101101 }
102102}
103103
104- // SymbolHandler will pass the call from /debug/pprof/symbol to pprof
104+ // SymbolHandler will pass the call from /debug/pprof/symbol to pprof.
105105func SymbolHandler () echo.HandlerFunc {
106106 return func (ctx echo.Context ) error {
107107 pprof .Symbol (ctx .Response ().Writer , ctx .Request ())
108108 return nil
109109 }
110110}
111111
112- // TraceHandler will pass the call from /debug/pprof/trace to pprof
112+ // TraceHandler will pass the call from /debug/pprof/trace to pprof.
113113func TraceHandler () echo.HandlerFunc {
114114 return func (ctx echo.Context ) error {
115115 pprof .Trace (ctx .Response ().Writer , ctx .Request ())
116116 return nil
117117 }
118118}
119119
120- // MutexHandler will pass the call from /debug/pprof/mutex to pprof
120+ // MutexHandler will pass the call from /debug/pprof/mutex to pprof.
121121func MutexHandler () echo.HandlerFunc {
122122 return func (ctx echo.Context ) error {
123123 pprof .Handler ("mutex" ).ServeHTTP (ctx .Response ().Writer , ctx .Request ())
0 commit comments