testutils

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2022 License: ISC Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestLogBackend

func NewTestLogBackend(t testing.TB) *testLogBackend

NewTestLogBackend returns a log backend that can be used as an io.Writer to write logs to during a test.

func TestLoggerBackend

func TestLoggerBackend(t testing.TB, name string) func(subsys string) slog.Logger

TestLoggerBackend returns a function that generates loggers for subsystems, all of which log by calling t.Log.

func TestLoggerSys

func TestLoggerSys(t testing.TB, sys string) slog.Logger

TestLoggerSys returns an slog.Logger that logs by issuing t.Log calls.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL