package slogtest

import "log/slog/internal/slogtest"

Package slogtest contains support functions for testing slog.

Index

Functions

func RemoveTime

func RemoveTime(groups []string, a slog.Attr) slog.Attr

RemoveTime removes the top-level time attribute. It is intended to be used as a ReplaceAttr function, to make example output deterministic.

Source Files

slogtest.go

Version
v1.24.0 (latest)
Published
Feb 10, 2025
Platform
linux/amd64
Imports
1 packages
Last checked
11 seconds ago

Tools for package owners.