MCPcopy
hub / github.com/connectrpc/connect-go / ErrorIs

Function ErrorIs

internal/assert/assert.go:111–118  ·  view source on GitHub ↗

ErrorIs asserts that "want" is in "got's" error chain. See the standard library's errors package for details on error chains. On failure, output is identical to Equal.

(tb testing.TB, got, want error, options ...Option)

Source from the content-addressed store, hash-verified

109// library's errors package for details on error chains. On failure, output is
110// identical to Equal.
111func ErrorIs(tb testing.TB, got, want error, options ...Option) bool {
112 tb.Helper()
113 if errors.Is(got, want) {
114 return true
115 }
116 report(tb, got, want, "assert.ErrorIs", true /* showWant */, options...)
117 return false
118}
119
120// False asserts that "got" is false.
121func False(tb testing.TB, got bool, options ...Option) bool {

Calls 1

reportFunction · 0.85