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

Function NoError

internal/assert/assertions.go:50–57  ·  view source on GitHub ↗

NoError asserts that an error is nil.

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

Source from the content-addressed store, hash-verified

48
49// NoError asserts that an error is nil.
50func NoError(tb testing.TB, err error, msgAndArgs ...any) {
51 tb.Helper()
52 if err == nil {
53 return
54 }
55 msg := formatMsgAndArgs("Unexpected error:", msgAndArgs...)
56 tb.Fatalf("%s\n%+v", msg, err)
57}
58
59// Panics asserts that the given function panics.
60func Panics(tb testing.TB, fn func(), msgAndArgs ...any) {

Callers 15

TestUnmarshal_IntegersFunction · 0.92
TestUnmarshal_FloatsFunction · 0.92
TestUnmarshalFunction · 0.92
TestUnmarshalOverflowsFunction · 0.92
TestUnmarshalFloat32Function · 0.92
TestDecoderStrictFunction · 0.92
TestIssue252Function · 0.92
TestIssue287Function · 0.92
TestIssue458Function · 0.92
TestIssue484Function · 0.92
TestIssue494Function · 0.92
TestIssue508Function · 0.92

Calls 2

formatMsgAndArgsFunction · 0.85
FatalfMethod · 0.80

Tested by 15

TestUnmarshal_IntegersFunction · 0.74
TestUnmarshal_FloatsFunction · 0.74
TestUnmarshalFunction · 0.74
TestUnmarshalOverflowsFunction · 0.74
TestUnmarshalFloat32Function · 0.74
TestDecoderStrictFunction · 0.74
TestIssue252Function · 0.74
TestIssue287Function · 0.74
TestIssue458Function · 0.74
TestIssue484Function · 0.74
TestIssue494Function · 0.74
TestIssue508Function · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…