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

Method Is

internal/status/status.go:222–228  ·  view source on GitHub ↗

Is implements future error.Is functionality. A Error is equivalent if the code and message are identical.

(target error)

Source from the content-addressed store, hash-verified

220// Is implements future error.Is functionality.
221// A Error is equivalent if the code and message are identical.
222func (e *Error) Is(target error) bool {
223 tse, ok := target.(*Error)
224 if !ok {
225 return false
226 }
227 return proto.Equal(e.s.s, tse.s.s)
228}
229
230// IsRestrictedControlPlaneCode returns whether the status includes a code
231// restricted for control plane usage as defined by gRFC A54.

Calls 1

EqualMethod · 0.65