Skip to content

Commit

Permalink
Update route.go
Browse files Browse the repository at this point in the history
  • Loading branch information
KlassnayaAfrodita authored Dec 26, 2024
1 parent 72a5064 commit e7eef7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions route.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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) {
Expand Down

0 comments on commit e7eef7b

Please sign in to comment.