commit | a67bb567ff2e19a7f944d3dcd48d635b71a5066d | [log] [tgz] |
---|---|---|
author | Jonathan Amsterdam <jba@google.com> | Tue Jan 24 11:16:11 2023 -0500 |
committer | Jonathan Amsterdam <jba@google.com> | Thu Jan 26 17:38:53 2023 +0000 |
tree | c2ed09bff27ffdd8b99b890add9c7a0b9151bc6c | |
parent | b3c2aaf6208dd245d356334775d544edb2fa3040 [diff] |
slog: marshal/unmarshal support for Levels Add UnmarshalJSON to match MarshalJSON. Add MarshalText and UnmarshalText. These enable using flag.TextVar for levels. Change-Id: I79fe4ed96ea100562dc03d8cc07e0848816751f9 Reviewed-on: https://go-review.googlesource.com/c/exp/+/463256 Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> TryBot-Result: Gopher Robot <gobot@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.