MCPcopy
hub / github.com/pelletier/go-toml / Error

Function Error

internal/assert/assertions.go:41–47  ·  view source on GitHub ↗

Error asserts that an error is not nil.

(tb testing.TB, err error, msgAndArgs ...any)

Source from the content-addressed store, hash-verified

39
40// Error asserts that an error is not nil.
41func Error(tb testing.TB, err error, msgAndArgs ...any) {
42 tb.Helper()
43 if err != nil {
44 return
45 }
46 tb.Fatal(formatMsgAndArgs("Expected an error", msgAndArgs...))
47}
48
49// NoError asserts that an error is nil.
50func NoError(tb testing.TB, err error, msgAndArgs ...any) {

Callers 15

TestDecodeReaderErrorFunction · 0.92
TestUnmarshal_IntegersFunction · 0.92
TestUnmarshal_FloatsFunction · 0.92
TestUnmarshalFunction · 0.92
TestUnmarshalOverflowsFunction · 0.92
TestUnmarshalErrorsFunction · 0.92
TestUnmarshalFloat32Function · 0.92
TestIssue507Function · 0.92
TestIssue579Function · 0.92

Calls 2

formatMsgAndArgsFunction · 0.85
FatalMethod · 0.80

Tested by 15

TestDecodeReaderErrorFunction · 0.74
TestUnmarshal_IntegersFunction · 0.74
TestUnmarshal_FloatsFunction · 0.74
TestUnmarshalFunction · 0.74
TestUnmarshalOverflowsFunction · 0.74
TestUnmarshalErrorsFunction · 0.74
TestUnmarshalFloat32Function · 0.74
TestIssue507Function · 0.74
TestIssue579Function · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…