refactor: change package names

This commit is contained in:
Julian Tölle 2024-05-02 21:42:36 +02:00
parent 62578ad5c5
commit 4b77b81689
24 changed files with 167 additions and 155 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 }