Documentation
¶
Overview ¶
Package test provides useful test helpers that can be used in multiple packages.
Index ¶
- Variables
- type Handler
- func (h *Handler) Enabled(_ context.Context, lvl slog.Level) bool
- func (h *Handler) Handle(ctx context.Context, r slog.Record) error
- func (h *Handler) MarshalJSON() ([]byte, error)
- func (h *Handler) String() string
- func (h *Handler) WithAttrs([]slog.Attr) slog.Handler
- func (h *Handler) WithGroup(string) slog.Handler
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTime = time.Date(2023, 9, 29, 13, 0, 59, 0, time.UTC)
DefaultTime is a single point in time to use for log lines
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler is a slog.Handler that records the records that come its way
func (*Handler) MarshalJSON ¶
MarshalJSON formats all log records with slog.JSONHandler
Click to show internal directories.
Click to hide internal directories.