MCPcopy Create free account
hub / github.com/coder/slog / Fatal

Function Fatal

sloggers/slogtest/t.go:172–175  ·  view source on GitHub ↗

Fatal logs the given msg and fields to t via t.Fatal at the fatal level.

(t testing.TB, msg string, fields ...slog.Field)

Source from the content-addressed store, hash-verified

170
171// Fatal logs the given msg and fields to t via t.Fatal at the fatal level.
172func Fatal(t testing.TB, msg string, fields ...slog.Field) {
173 slog.Helper()
174 l(t).Fatal(ctx, msg, fields...)
175}
176
177// FindFirstError finds the first slog.Field named "error" that contains an
178// error value.

Callers 5

TestStatelessFunction · 0.92
EqualFunction · 0.92
SuccessFunction · 0.92
ErrorFunction · 0.92
ErrorContainsFunction · 0.92

Calls 3

lFunction · 0.85
HelperMethod · 0.45
FatalMethod · 0.45

Tested by 1

TestStatelessFunction · 0.74