mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-28 03:57:02 +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.
|
// Recovery is a server middleware that recovers from any panics.
|
||||||
func Recovery(opts ...Option) middleware.Middleware {
|
func Recovery(opts ...Option) middleware.Middleware {
|
||||||
op := options{
|
op := options{
|
||||||
|
@ -6,7 +6,6 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/go-kratos/kratos/v2/errors"
|
"github.com/go-kratos/kratos/v2/errors"
|
||||||
"github.com/go-kratos/kratos/v2/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestOnce(t *testing.T) {
|
func TestOnce(t *testing.T) {
|
||||||
@ -35,8 +34,3 @@ func TestNotPanic(t *testing.T) {
|
|||||||
t.Errorf("e isn't nil")
|
t.Errorf("e isn't nil")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Remove this test with WithLogger method.
|
|
||||||
func TestWithLogger(t *testing.T) {
|
|
||||||
_ = WithLogger(log.DefaultLogger)
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user