From f90e5874ef6c95c387945d174308f735d0fd9702 Mon Sep 17 00:00:00 2001 From: longXboy Date: Tue, 1 Jun 2021 22:18:42 +0800 Subject: [PATCH] delete http recovery --- transport/http/handle.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/transport/http/handle.go b/transport/http/handle.go index 6296131ed..1034a251d 100644 --- a/transport/http/handle.go +++ b/transport/http/handle.go @@ -11,7 +11,6 @@ import ( "github.com/go-kratos/kratos/v2/errors" "github.com/go-kratos/kratos/v2/internal/httputil" "github.com/go-kratos/kratos/v2/middleware" - "github.com/go-kratos/kratos/v2/middleware/recovery" "github.com/go-kratos/kratos/v2/transport/http/binding" ) @@ -43,10 +42,9 @@ type HandleOptions struct { // Deprecated: use NewHandler instead. func DefaultHandleOptions() HandleOptions { return HandleOptions{ - Decode: DefaultRequestDecoder, - Encode: DefaultResponseEncoder, - Error: DefaultErrorEncoder, - Middleware: recovery.Recovery(), + Decode: DefaultRequestDecoder, + Encode: DefaultResponseEncoder, + Error: DefaultErrorEncoder, } }