iris/_examples/miscellaneous/pprof/main.go
Gerasimos (Makis) Maropoulos 700dcc8005 new feature: handle different param types in the exact same path pattern
implements https://github.com/kataras/iris/issues/1315


Former-commit-id: 3e9276f2a95d6fc7c10fbf91186d041dcba72611
2019-07-29 23:09:22 +03:00

22 lines
404 B
Go

package main
import (
"github.com/kataras/iris"
"github.com/kataras/iris/middleware/pprof"
)
func main() {
app := iris.New()
app.Get("/", func(ctx iris.Context) {
ctx.HTML("<h1> Please click <a href='/debug/pprof'>here</a>")
})
p := pprof.New()
app.Any("/debug/pprof", p)
app.Any("/debug/pprof/{action:path}", p)
// ___________
app.Run(iris.Addr(":8080"))
}