commit | 059f4d9a09539fc59f6bb1797d00872a7d650ee2 | [log] [tgz] |
---|---|---|
author | Jonathan Amsterdam <jba@google.com> | Sun Feb 05 08:54:01 2023 -0500 |
committer | Jonathan Amsterdam <jba@google.com> | Fri Feb 10 20:29:55 2023 +0000 |
tree | dd91d099d3f836b43157adc75d99757ddeeaaef5 | |
parent | 46f607a4077115ebda03e235dd8912b87b9ea396 [diff] |
slog: Handlers drop empty groups. If a group has no elements, then drop it completely instead of outputting something like "g":{} Besides removing clutter from the output, this allows LogValuers to return a Value that is dropped. Zap uses a special field type "Skip" for this purpose (equivalent to a new slog value kind), but this solution is simpler. Change-Id: I31885062660cd44e75349f6823d0e427b70e2f8e Reviewed-on: https://go-review.googlesource.com/c/exp/+/465375 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Russ Cox <rsc@golang.org>
This subrepository holds experimental and deprecated (in the old
directory) packages.
The idea for this subrepository originated as the pkg/exp
directory of the main repository, but its presence there made it unavailable to users of the binary downloads of the Go installation. The subrepository has therefore been created to make it possible to go get
these packages.
Warning: Packages here are experimental and unreliable. Some may one day be promoted to the main repository or other subrepository, or they may be modified arbitrarily or even disappear altogether.
In short, code in this subrepository is not subject to the Go 1 compatibility promise. (No subrepo is, but the promise is even more likely to be violated by go.exp than the others.)
Caveat emptor.