(ctx context.Context)
| 31 | } |
| 32 | |
| 33 | func attrsFromContext(ctx context.Context) []slog.Attr { |
| 34 | if ctx == nil { |
| 35 | return nil |
| 36 | } |
| 37 | attrs, ok := ctx.Value(contextAttrsKey{}).([]slog.Attr) |
| 38 | if !ok { |
| 39 | return nil |
| 40 | } |
| 41 | return attrs |
| 42 | } |
| 43 | |
| 44 | type contextHandler struct { |
| 45 | handler slog.Handler |