diff options
author | Jonathan Amsterdam <jba@google.com> | 2023-04-23 11:23:53 -0400 |
---|---|---|
committer | Jonathan Amsterdam <jba@google.com> | 2023-04-24 18:07:26 +0000 |
commit | c80cedec9378b0a1cd5cb400e179bb25e2e7f810 (patch) | |
tree | fd0da6d5813983dd701d6b1a359d61718548e811 /api | |
parent | ddd822e5ca0e686ae64d921bcfe28119c34278fb (diff) | |
download | go-git-c80cedec9378b0a1cd5cb400e179bb25e2e7f810.tar.gz |
testing/slogtest: tests for slog handlers
Add a package for testing that a slog.Handler implementation
satisfies that interface's documented requirements.
Code copied from x/exp/slog/slogtest.
Updates #56345.
Change-Id: I89e94d93bfbe58e3c524758f7ac3c3fba2a2ea96
Reviewed-on: https://go-review.googlesource.com/c/go/+/487895
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/next/56345.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/next/56345.txt b/api/next/56345.txt index 7a8f8254b9..fd3893e81d 100644 --- a/api/next/56345.txt +++ b/api/next/56345.txt @@ -112,7 +112,6 @@ pkg log/slog, method (Level) Level() Level #56345 pkg log/slog, method (Level) MarshalJSON() ([]uint8, error) #56345 pkg log/slog, method (Level) MarshalText() ([]uint8, error) #56345 pkg log/slog, method (Level) String() string #56345 -pkg log/slog, method (Record) Attrs(func(Attr)) #56345 pkg log/slog, method (Record) Clone() Record #56345 pkg log/slog, method (Record) NumAttrs() int #56345 pkg log/slog, method (Value) Any() interface{} #56345 @@ -156,3 +155,4 @@ pkg log/slog, type Record struct, PC uintptr #56345 pkg log/slog, type Record struct, Time time.Time #56345 pkg log/slog, type TextHandler struct #56345 pkg log/slog, type Value struct #56345 +pkg testing/slogtest, func TestHandler(slog.Handler, func() []map[string]interface{}) error #56345 |