1
0
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:
LiuDui 2023-02-06 11:25:50 +08:00 committed by GitHub
parent 239121155d
commit 08f37391e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 12 deletions

View File

@ -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{

View File

@ -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)
}