mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-01 03:14:16 +00:00
d30e561d9e
Add functions to the proto package which plumb through the fast-path state. As a sample use case: A followup CL adds an Initialized field to protoiface.UnmarshalOutput, permitting the unmarshaller to report back when it can confirm that a message is fully initialized. We want to preserve that information when an unmarshal operation threads through the proto package (such as when unmarshaling extensions). To allow these functions to be added as methods of MarshalOptions and UnmarshalOptions rather than top-level functions, separate the options from the input structs. Also update options passed to fast-path methods to set AllowPartial and Merge to reflect the expected behavior of those methods. (Always allow partial, never merge.) Change-Id: I482477b0c9340793be533e75a86d0bb88708716a Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/215877 Reviewed-by: Joe Tsai <joetsai@google.com> |
||
---|---|---|
.. | ||
protodesc | ||
protoreflect | ||
protoregistry |