diff options
| author | Jonathan Amsterdam <jba@google.com> | 2023-04-19 16:51:05 -0400 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2023-05-04 20:20:40 +0000 |
| commit | 0022bd37a7f2483312950bcafbb3916ab76635ec (patch) | |
| tree | 40a2d450c4653c66177f300020232babfb415e60 /src/runtime/testdata | |
| parent | 0212b80eacaf03365810ea93e0380aefe8b8ab42 (diff) | |
| download | go-0022bd37a7f2483312950bcafbb3916ab76635ec.tar.xz | |
log/slog: remove special float handling from JSONHandler
Remove the special-case handling of NaN and infinities from
appendJSONValue, making JSONHandler behave almost exactly like
a json.Encoder without HTML escaping.
The only differences are:
- Encoding errors are turned into strings, instead of causing the Handle method to fail.
- Values of type `error` are displayed as strings by calling their `Error` method.
Fixes #59345.
Change-Id: Id06bd952bbfef596e864bd5fd3f9f4f178f738c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/486855
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/runtime/testdata')
0 files changed, 0 insertions, 0 deletions
