diff options
| author | Jonathan Amsterdam <jba@google.com> | 2023-04-19 14:24:33 -0400 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2023-05-04 18:32:54 +0000 |
| commit | a82f69f60e976d1a99c477903f5de98839c24f70 (patch) | |
| tree | 3486f77181c2f28d3cb5e0d183c5ccb1846bf4fb /src/testing/slogtest/example_test.go | |
| parent | 5c51e9f45b0a7a13e5dd3bd6487f67d2bbdb5346 (diff) | |
| download | go-a82f69f60e976d1a99c477903f5de98839c24f70.tar.xz | |
log/slog: built-in handler constructors take options as a second arg
There is now one constructor function for each built-in handler, with
signature
NewXXXHandler(io.Writer, *HandlerOptions) *XXXHandler
Fixes #59339.
Change-Id: Ia02183c5ce0dc15c64e33ad05fd69bca09df2d2d
Reviewed-on: https://go-review.googlesource.com/c/go/+/486415
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'src/testing/slogtest/example_test.go')
| -rw-r--r-- | src/testing/slogtest/example_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testing/slogtest/example_test.go b/src/testing/slogtest/example_test.go index 61e4b46e12..0517a4b857 100644 --- a/src/testing/slogtest/example_test.go +++ b/src/testing/slogtest/example_test.go @@ -19,7 +19,7 @@ import ( // format when given a pointer to a map[string]any. func Example_parsing() { var buf bytes.Buffer - h := slog.NewJSONHandler(&buf) + h := slog.NewJSONHandler(&buf, nil) results := func() []map[string]any { var ms []map[string]any |
