File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,16 @@ func getPrefix(prefixOptions ...string) string {
2020}
2121
2222// Register the standard HandlerFuncs from the net/http/pprof package with
23- // the provided gin.Engine . prefixOptions is a optional. If not prefixOptions,
23+ // the provided gin.IRouter . prefixOptions is a optional. If not prefixOptions,
2424// the default path prefix is used, otherwise first prefixOptions will be path prefix.
25- func Register (r * gin.Engine , prefixOptions ... string ) {
26- RouteRegister (& ( r . RouterGroup ) , prefixOptions ... )
25+ func Register (r gin.IRouter , prefixOptions ... string ) {
26+ RouteRegister (r , prefixOptions ... )
2727}
2828
2929// RouteRegister the standard HandlerFuncs from the net/http/pprof package with
30- // the provided gin.GrouterGroup . prefixOptions is a optional. If not prefixOptions,
30+ // the provided gin.IRouter . prefixOptions is a optional. If not prefixOptions,
3131// the default path prefix is used, otherwise first prefixOptions will be path prefix.
32- func RouteRegister (rg * gin.RouterGroup , prefixOptions ... string ) {
32+ func RouteRegister (rg gin.IRouter , prefixOptions ... string ) {
3333 prefix := getPrefix (prefixOptions ... )
3434
3535 prefixRouter := rg .Group (prefix )
You can’t perform that action at this time.
0 commit comments