These are chat archives for gin-gonic/gin

12th
Dec 2017
Arthur-Lee
@arthurkiller
Dec 12 2017 11:31

Hey guys, I get a problem here

I want to use the gin for /debug/pprof and /debug/vars routing. I use gin.WrapH(http.DefaultServeMux) as the handler for prefix routing rule.

But in my code, I can not reach /debug/pprof/heap. And there is less guide in document for me.

I wonder if here are some misunderstand in my code

        router.GET("/status", Status)
        rg := router.Group("/debug", gin.WrapH(http.DefaultServeMux))  // here!
        rg.GET("/pprof", gin.WrapH(http.DefaultServeMux))
        rg.GET("/vars", gin.WrapH(http.DefaultServeMux))
gin-gonic/gin#1197
So my question is: How should I do the route for a common prefix URL request with one handler
ankitm123
@ankitm123
Dec 12 2017 14:23
@threeq thanks :)