commit | 2d61f44442a3e338267967610954f678b0dea841 | [log] [tgz] |
---|---|---|
author | Jonathan Amsterdam <jba@google.com> | Sun Sep 11 13:31:42 2022 -0400 |
committer | Jonathan Amsterdam <jba@google.com> | Thu Sep 15 10:58:10 2022 +0000 |
tree | 46d323ed6a106bd988689a91da452449a4c4a4f9 | |
parent | d6a8ba41c44943eada59dbba873aa3618c0d36ec [diff] |
slog: remove Attr.AppendValue Attr.AppendValue was originally intended to be a convenient and more efficient way of formatting Attr values. But there is no one clearly right way to format them, and the efficiency argument doesn't really hold water: AppendValue skips the redundant but cheap type check that occurs in switch a.Kind() { case IntKind: ... a.Int() .. but then formats Times and Durations as strings instead of integers. We keep it internally to help out in a couple of places, but overall it's better if Handler implementations do their own value formatting. For casual use, fmt.Sprint(a.Value()) is fine. Change-Id: Ie265f1ee5daf5f8002bfc2b70f4bf461cb07a10b Reviewed-on: https://go-review.googlesource.com/c/exp/+/430098 Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Alan Donovan <adonovan@google.com>
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.