refactor: yeet util/ subdirs

This commit is contained in:
Julian Tölle 2024-05-02 21:18:20 +02:00
parent b6ae95f55b
commit 62578ad5c5
13 changed files with 10 additions and 10 deletions

View file

@ -1,15 +0,0 @@
package contextlogger
import (
"context"
"log/slog"
)
// discardHandler is a [slog.Handler] that just discards any input. It is a safe default if any library
// method does not get passed a logger through the context.
type discardHandler struct{}
func (discardHandler) Enabled(_ context.Context, _ slog.Level) bool { return false }
func (discardHandler) Handle(_ context.Context, _ slog.Record) error { return nil }
func (d discardHandler) WithAttrs(_ []slog.Attr) slog.Handler { return d }
func (d discardHandler) WithGroup(_ string) slog.Handler { return d }