package testhelp

import "github.com/go-logr/logr/internal/testhelp"

Package testhelp holds helper functions for the testing of logr and built-in implementations.

Index

Functions

func RunSlogTests

func RunSlogTests(t *testing.T, createHandler func(buffer *bytes.Buffer) slog.Handler, exceptions ...string)

RunSlogTests runs slogtest.TestHandler on a given slog.Handler, which is expected to emit JSON into the provided buffer.

Source Files

slog.go

Version
v1.4.0
Published
Dec 19, 2023
Platform
js/wasm
Imports
6 packages
Last checked
24 minutes ago

Tools for package owners.