log/slog: fix HandlersOptions.ReplaceAttr documentation when attribute is discarded #60870
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Documentation for latest (v0.0.0-20230522175609-2e198f4a06a1) version of HandlersOptions.ReplaceAttr says:
This is counter-intuitive (because Handler.Handle docs discard zero attribute instead), prevent returning group attrs with empty key to embed group, and didn't match actual behaviour of current implementation (which is correct: it discards zero Attr and handles Attr with empty Key but non-zero Value).
Looks like docs should be fixed to match current implementation.
(Maybe golang.org/x/exp/slog docs needs similar fix.)
The text was updated successfully, but these errors were encountered: