commit | d43d523210b1b174b48f5047ebb1dc3aaf128317 | [log] [tgz] |
---|---|---|
author | Jonathan Amsterdam <jba@google.com> | Mon Aug 29 08:05:29 2022 -0400 |
committer | Jonathan Amsterdam <jba@google.com> | Tue Sep 06 20:00:07 2022 +0000 |
tree | 67c6e2d8059d88358ee4f2289ce3daeef7e0ba7c | |
parent | 5c2e9b4951fdec1c49da02bc85e5f87a887a42f2 [diff] |
slog: Attrs Define Attr, an alloc-efficient key-value pair. Attr is like any, but does not allocate for most basic types. It can be used for low-allocation logging. The unsafe version, which is the default, exploits the representation of Go strings to save space. The ideas here are largely taken from Ian Cottrell's Label implementation, https://cs.opensource.google/go/x/exp/+/334a2380:event/label.go. Change-Id: I8283fefc208ab6d306d5cc32bc0a0ccc295fab57 Reviewed-on: https://go-review.googlesource.com/c/exp/+/426021 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.