chore: clean up deprecated code (#2648)

pull/2652/head
LiuDui 2 years ago committed by GitHub
parent 239121155d
commit 08f37391e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      middleware/recovery/recovery.go
  2. 6
      middleware/recovery/recovery_test.go

@ -29,12 +29,6 @@ func WithHandler(h HandlerFunc) Option {
}
}
// WithLogger with recovery logger.
// Deprecated: use global logger instead.
func WithLogger(logger log.Logger) Option {
return func(o *options) {}
}
// Recovery is a server middleware that recovers from any panics.
func Recovery(opts ...Option) middleware.Middleware {
op := options{

@ -6,7 +6,6 @@ import (
"testing"
"github.com/go-kratos/kratos/v2/errors"
"github.com/go-kratos/kratos/v2/log"
)
func TestOnce(t *testing.T) {
@ -35,8 +34,3 @@ func TestNotPanic(t *testing.T) {
t.Errorf("e isn't nil")
}
}
// Deprecated: Remove this test with WithLogger method.
func TestWithLogger(t *testing.T) {
_ = WithLogger(log.DefaultLogger)
}

Loading…
Cancel
Save