mirror of https://github.com/golang/go.git
As #61067 pointed out, slog did not properly handle empty groups. https://go.dev/cl/508436 dealt with most cases inside slog itself, but handlers must still do a check on their own. Namely, a handler must not output a group created by WithGroup unless the Record has attributes. This change adds a test to slogtest to check that case. Fixes #61227. Change-Id: Ibc065b6e5f6e199a41bce8332ea8c7f9d8373392 Reviewed-on: https://go-review.googlesource.com/c/go/+/508438 Reviewed-by: Alan Donovan <adonovan@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> |
||
|---|---|---|
| .. | ||
| fstest | ||
| internal/testdeps | ||
| iotest | ||
| quick | ||
| slogtest | ||
| allocs.go | ||
| allocs_test.go | ||
| benchmark.go | ||
| benchmark_test.go | ||
| cover.go | ||
| example.go | ||
| export_test.go | ||
| flag_test.go | ||
| fuzz.go | ||
| helper_test.go | ||
| helperfuncs_test.go | ||
| match.go | ||
| match_test.go | ||
| newcover.go | ||
| panic_test.go | ||
| run_example.go | ||
| run_example_wasm.go | ||
| sub_test.go | ||
| testing.go | ||
| testing_other.go | ||
| testing_test.go | ||
| testing_windows.go | ||