mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 13:07:36 +03:00
Fix staticcheck's SA1029
This commit is contained in:
parent
5ce3135f00
commit
f8362a4acb
19 changed files with 152 additions and 57 deletions
|
@ -136,7 +136,7 @@ var _ = Describe("Logger", func() {
|
|||
It("returns the logger from context if it has one", func() {
|
||||
logger := logrus.NewEntry(logrus.New())
|
||||
ctx := context.Background()
|
||||
ctx = context.WithValue(ctx, "logger", logger)
|
||||
ctx = context.WithValue(ctx, loggerCtxKey, logger)
|
||||
|
||||
Expect(extractLogger(ctx)).To(Equal(logger))
|
||||
})
|
||||
|
@ -144,7 +144,7 @@ var _ = Describe("Logger", func() {
|
|||
It("returns the logger from request's context if it has one", func() {
|
||||
logger := logrus.NewEntry(logrus.New())
|
||||
ctx := context.Background()
|
||||
ctx = context.WithValue(ctx, "logger", logger)
|
||||
ctx = context.WithValue(ctx, loggerCtxKey, logger)
|
||||
req := httptest.NewRequest("get", "/", nil).WithContext(ctx)
|
||||
|
||||
Expect(extractLogger(req)).To(Equal(logger))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue