Closed ad3n closed 1 month ago
func Index(ctx *fasthttp.RequestCtx) { ctx.WriteString("Welcome!") } func Hello(ctx *fasthttp.RequestCtx) { fmt.Fprintf(ctx, "Hello, %s!\n", ctx.UserValue("name")) } func main() { r := router.New() r.GET("/", Index) r.GET("/{name1}/{name3}", Hello) r.GET("/{name}/{name3}", Hello) log.Fatal(fasthttp.ListenAndServe(":8080", r.Handler)) }
Expected catch panic
Hi @ad3n,
You must define a PanicHandler, if you want to catch panics.
Expected catch panic