slogtest

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockHandler

type MockHandler struct {
	slog.Handler
	// contains filtered or unexported fields
}

Mock slog handler for testing.

func NewMockHandler

func NewMockHandler(h slog.Handler, t *testing.T, l slog.Level, f []slog.Attr, sf []string) *MockHandler

NewMockHandler creates a new mock handler.

func (*MockHandler) Handle

func (h *MockHandler) Handle(ctx context.Context, r slog.Record) error

Handle implements Handler.Handle.

Jump to

Keyboard shortcuts

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