add pprof view

This commit is contained in:
Jay
2018-10-11 11:19:55 +08:00
parent dadec96cc0
commit bd8971d9a6
2 changed files with 13 additions and 0 deletions
+4
View File
@@ -13,6 +13,7 @@ import (
"git.trj.tw/golang/mtfosbot/router/rimg"
"git.trj.tw/golang/mtfosbot/router/twitch"
"github.com/gin-contrib/cors"
"github.com/gin-contrib/pprof"
"github.com/gin-gonic/contrib/sessions"
"github.com/gin-gonic/gin"
)
@@ -102,4 +103,7 @@ func SetRoutes(r *gin.Engine) {
twitchApis.GET("/login", context.PatchCtx(twitch.OAuthLogin))
twitchApis.GET("/oauth", context.PatchCtx(twitch.OAuthProc))
}
// set pprof router
pprof.Register(r)
}