MCPcopy
hub / github.com/golang/protobuf / isSingularWellKnownValue

Function isSingularWellKnownValue

jsonpb/decode.go:389–400  ·  view source on GitHub ↗
(fd protoreflect.FieldDescriptor)

Source from the content-addressed store, hash-verified

387}
388
389func isSingularWellKnownValue(fd protoreflect.FieldDescriptor) bool {
390 if fd.Cardinality() == protoreflect.Repeated {
391 return false
392 }
393 if md := fd.Message(); md != nil {
394 return md.FullName() == "google.protobuf.Value"
395 }
396 if ed := fd.Enum(); ed != nil {
397 return ed.FullName() == "google.protobuf.NullValue"
398 }
399 return false
400}
401
402func isSingularJSONPBUnmarshaler(v protoreflect.Value, fd protoreflect.FieldDescriptor) bool {
403 if fd.Message() != nil && fd.Cardinality() != protoreflect.Repeated {

Callers 1

unmarshalMessageMethod · 0.85

Calls 1

EnumMethod · 0.45

Tested by

no test coverage detected