MCPcopy
hub / github.com/netdata/netdata / last

Method last

src/go/logger/testutils_test.go:53–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51}
52
53func (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
62func setTestLevel(t *testing.T, level slog.Level) {
63 t.Helper()

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected