()
| 51 | } |
| 52 | |
| 53 | func (h *captureHandler) last() capturedRecord { |
| 54 | h.mu.Lock() |
| 55 | defer h.mu.Unlock() |
| 56 | if len(h.records) == 0 { |
| 57 | return capturedRecord{} |
| 58 | } |
| 59 | return h.records[len(h.records)-1] |
| 60 | } |
| 61 | |
| 62 | func setTestLevel(t *testing.T, level slog.Level) { |
| 63 | t.Helper() |
no test coverage detected