MCPcopy
hub / github.com/grpc/grpc-go / errEqual

Function errEqual

status/status_test.go:52–62  ·  view source on GitHub ↗

errEqual is essentially a copy of testutils.StatusErrEqual(), to avoid a cyclic dependency.

(err1, err2 error)

Source from the content-addressed store, hash-verified

50// errEqual is essentially a copy of testutils.StatusErrEqual(), to avoid a
51// cyclic dependency.
52func errEqual(err1, err2 error) bool {
53 status1, ok := FromError(err1)
54 if !ok {
55 return false
56 }
57 status2, ok := FromError(err2)
58 if !ok {
59 return false
60 }
61 return proto.Equal(status1.Proto(), status2.Proto())
62}
63
64func (s) TestErrorsWithSameParameters(t *testing.T) {
65 const description = "some description"

Callers 1

Calls 3

FromErrorFunction · 0.85
ProtoMethod · 0.80
EqualMethod · 0.65

Tested by

no test coverage detected