From e7eef7b11ffa29193164af1acc2d72c1452a91df Mon Sep 17 00:00:00 2001 From: Evgeny <113383200+KlassnayaAfrodita@users.noreply.github.com> Date: Thu, 26 Dec 2024 03:56:43 +0300 Subject: [PATCH] Update route.go --- route.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/route.go b/route.go index 316b9a4..7d3d71e 100644 --- a/route.go +++ b/route.go @@ -91,7 +91,7 @@ func (r *Route) GlobalMiddleware(middlewares ...httpcontract.Middleware) { r.setMiddlewares(middlewares) } -func HandleRecover(ctx httpcontract.Context, recoverCallback func(ctx httpcontext.Context, err any)) { +func HandleRecover(ctx httpcontract.Context, recoverCallback func(ctx httpcontract.Context, err any)) { if err := recover(); err != nil { if recoverCallback != nil { recoverCallback(ctx, err) @@ -101,7 +101,7 @@ func HandleRecover(ctx httpcontract.Context, recoverCallback func(ctx httpcontex } } -func (r *Route) Recover(callback func(ctx httpcontext.Context, err any)) { +func (r *Route) Recover(callback func(ctx httpcontract.Context, err any)) { globalRecoverCallback = callback r.setMiddlewares([]httpcontract.Middleware{ func(ctx httpcontract.Context) {