MCPcopy
hub / github.com/protocolbuffers/protobuf-go / New

Method New

internal/impl/convert.go:37–37  ·  view source on GitHub ↗

New returns a new field value. For scalars, it returns the default value of the field. For composite types, it returns a new mutable value.

()

Source from the content-addressed store, hash-verified

35 // For scalars, it returns the default value of the field.
36 // For composite types, it returns a new mutable value.
37 New() protoreflect.Value
38
39 // Zero returns a new field value.
40 // For scalars, it returns the default value of the field.

Callers 15

fieldInfoForMapOpaqueMethod · 0.95
fieldInfoForOneofFunction · 0.95
fieldInfoForMapFunction · 0.95
fieldInfoForListFunction · 0.95
fieldInfoForScalarFunction · 0.95
fieldInfoForMessageFunction · 0.95
TestUnmarshalFunction · 0.65

Implementers 14

boolConverterinternal/impl/convert.go
int32Converterinternal/impl/convert.go
int64Converterinternal/impl/convert.go
uint32Converterinternal/impl/convert.go
uint64Converterinternal/impl/convert.go
float32Converterinternal/impl/convert.go
float64Converterinternal/impl/convert.go
stringConverterinternal/impl/convert.go
bytesConverterinternal/impl/convert.go
enumConverterinternal/impl/convert.go
messageConverterinternal/impl/convert.go
mapConverterinternal/impl/convert_map.go

Calls

no outgoing calls

Tested by 15

TestUnmarshalFunction · 0.52
roundTripAndCompareProtoFunction · 0.52
makeMessagesFunction · 0.52
roundTripAndCompareProtoFunction · 0.52
TestToTimestampFunction · 0.52
TestToDurationFunction · 0.52
TestRoundtripFunction · 0.52
TestDecodeFunction · 0.52
TestLegacyMarshalMethodFunction · 0.52