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

Function FromProto

internal/status/status.go:86–88  ·  view source on GitHub ↗

FromProto returns a Status representing s.

(s *spb.Status)

Source from the content-addressed store, hash-verified

84
85// FromProto returns a Status representing s.
86func FromProto(s *spb.Status) *Status {
87 return &Status{s: proto.Clone(s).(*spb.Status)}
88}
89
90// Err returns an error representing c and msg. If c is OK, returns nil.
91func Err(c codes.Code, msg string) error {

Callers 3

FromProtoFunction · 0.92
FromErrorFunction · 0.92
GRPCStatusMethod · 0.92

Calls 1

CloneMethod · 0.65

Tested by 1

GRPCStatusMethod · 0.74