delete http recovery

pull/991/head
longXboy 4 years ago
parent 864008ea6b
commit f90e5874ef
  1. 8
      transport/http/handle.go

@ -11,7 +11,6 @@ import (
"github.com/go-kratos/kratos/v2/errors" "github.com/go-kratos/kratos/v2/errors"
"github.com/go-kratos/kratos/v2/internal/httputil" "github.com/go-kratos/kratos/v2/internal/httputil"
"github.com/go-kratos/kratos/v2/middleware" "github.com/go-kratos/kratos/v2/middleware"
"github.com/go-kratos/kratos/v2/middleware/recovery"
"github.com/go-kratos/kratos/v2/transport/http/binding" "github.com/go-kratos/kratos/v2/transport/http/binding"
) )
@ -43,10 +42,9 @@ type HandleOptions struct {
// Deprecated: use NewHandler instead. // Deprecated: use NewHandler instead.
func DefaultHandleOptions() HandleOptions { func DefaultHandleOptions() HandleOptions {
return HandleOptions{ return HandleOptions{
Decode: DefaultRequestDecoder, Decode: DefaultRequestDecoder,
Encode: DefaultResponseEncoder, Encode: DefaultResponseEncoder,
Error: DefaultErrorEncoder, Error: DefaultErrorEncoder,
Middleware: recovery.Recovery(),
} }
} }

Loading…
Cancel
Save