(ctx context.Context, record slog.Record)
| 55 | } |
| 56 | |
| 57 | func (h *contextHandler) Handle(ctx context.Context, record slog.Record) error { |
| 58 | for _, attr := range attrsFromContext(ctx) { |
| 59 | record.AddAttrs(attr) |
| 60 | } |
| 61 | return h.handler.Handle(ctx, record) |
| 62 | } |
| 63 | |
| 64 | func (h *contextHandler) WithAttrs(attrs []slog.Attr) slog.Handler { |
| 65 | return &contextHandler{handler: h.handler.WithAttrs(attrs)} |
nothing calls this directly
no test coverage detected