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

Function New

internal/status/status.go:76–78  ·  view source on GitHub ↗

New returns a Status representing c and msg.

(c codes.Code, msg string)

Source from the content-addressed store, hash-verified

74
75// New returns a Status representing c and msg.
76func New(c codes.Code, msg string) *Status {
77 return &Status{s: &spb.Status{Code: int32(c), Message: msg}}
78}
79
80// Newf returns New(c, fmt.Sprintf(format, a...)).
81func Newf(c codes.Code, format string, a ...any) *Status {

Callers 4

TestRawStatusProtoFunction · 0.92
NewFunction · 0.92
NewfFunction · 0.70
ErrFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestRawStatusProtoFunction · 0.74