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

Function Unmarshal

proto/decode.go:61–64  ·  view source on GitHub ↗

Unmarshal parses the wire-format message in b and places the result in m. The provided message must be mutable (e.g., a non-nil pointer to a message). See the [UnmarshalOptions] type if you need more control.

(b []byte, m Message)

Source from the content-addressed store, hash-verified

59//
60// See the [UnmarshalOptions] type if you need more control.
61func Unmarshal(b []byte, m Message) error {
62 _, err := UnmarshalOptions{RecursionLimit: protowire.DefaultRecursionLimit}.unmarshal(b, m.ProtoReflect())
63 return err
64}
65
66// Unmarshal parses the wire-format message in b and places the result in m.
67// The provided message must be mutable (e.g., a non-nil pointer to a message).

Callers 15

roundTripAndCompareProtoFunction · 0.92
roundTripAndCompareProtoFunction · 0.92
TestDecodeEmptyBytesFunction · 0.92
ExampleUnmarshalFunction · 0.92
TestOpenSetRepeatedFunction · 0.92
testOpaqueSetRepeatedSubFunction · 0.92
TestNilFunction · 0.92
TestEncodeLargeFunction · 0.92

Calls 2

ProtoReflectMethod · 0.65
unmarshalMethod · 0.45

Tested by 15

roundTripAndCompareProtoFunction · 0.74
roundTripAndCompareProtoFunction · 0.74
TestDecodeEmptyBytesFunction · 0.74
ExampleUnmarshalFunction · 0.74
TestOpenSetRepeatedFunction · 0.74
testOpaqueSetRepeatedSubFunction · 0.74
TestNilFunction · 0.74
TestEncodeLargeFunction · 0.74