mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-14 02:33:03 +02:00
chore: clean up deprecated code (#2648)
This commit is contained in:
parent
239121155d
commit
08f37391e1
@ -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…
Reference in New Issue
Block a user