...

Package slogtest

import "log/slog/internal/slogtest"
Overview
Index

Overview ▾

Package slogtest contains support functions for testing slog.

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.