]> Cypherpunks.ru repositories - gostls13.git/commit
log/slog: replace nil contexts with context.Background()
authorJonathan Amsterdam <jba@google.com>
Fri, 7 Jul 2023 13:11:46 +0000 (09:11 -0400)
committerJonathan Amsterdam <jba@google.com>
Tue, 11 Jul 2023 17:06:26 +0000 (17:06 +0000)
commit651869716a449a1868f5a5333796ab47482d7c65
treea26f618d089ebdf1ca81b787565414da3a8007e1
parent3f8b04bfb541127704ec5c33a52294fe3c6ebea4
log/slog: replace nil contexts with context.Background()

Passing nil for a context is discouraged. We should avoid it.

Fixes #61219.

Change-Id: I664387070aacb56af580b6b0791ca40982d2a711
Reviewed-on: https://go-review.googlesource.com/c/go/+/508437
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/log/slog/doc.go
src/log/slog/example_custom_levels_test.go
src/log/slog/handler_test.go
src/log/slog/json_handler_test.go
src/log/slog/logger.go
src/log/slog/logger_test.go