mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2024-12-26 21:24:22 +00:00
bfc31022a5
Add checks so that MarshalFrom and UnmarshalTo consistently matches the behavior of the proto package with regard to nil messages. In particular, using a nil message as the destination results in a panic (which is already the current behavior), while using a nil message as the source does not panic (it is usually treated as an untyped empty message). Since an untyped message has no sensible meaning in the context of Any, return an error. Change-Id: I99e86c2cdfbd8be57cc039efd550458dc56aadbc Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/237920 Reviewed-by: Damien Neil <dneil@google.com> |
||
---|---|---|
.. | ||
internal_gengo | ||
testdata | ||
annotation_test.go | ||
main.go |