protobuf-go/proto
Damien Neil 37ef691e6b internal/impl: call Marshal/Unmarshal methods on legacy types
Call the Marshal or Unmarshal method on legacy messages implementing
protoV1.Marshaler or protoV2.Unmarshaler.

We do this in the impl package by creating an appropriate function in
the protoiface.Methods struct for legacy messages.

In proto.MarshalAppend, return the bytes provided by the fast-path
marshal function even when the returned error is non-nil.

Fixes golang/protobuf#955

Change-Id: I36924af9ff959a946c43f2295ef3202216e81b32
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/197357
Reviewed-by: Joe Tsai <joetsai@google.com>
2019-09-26 20:54:39 +00:00
..
bench_test.go
decode_gen.go
decode_test.go proto/equal: equate nil 2019-09-23 16:43:47 +00:00
decode.go proto, internal/impl: implement support for weak fields 2019-09-19 22:41:12 +00:00
doc.go
encode_gen.go
encode_test.go
encode.go internal/impl: call Marshal/Unmarshal methods on legacy types 2019-09-26 20:54:39 +00:00
equal_test.go proto/equal: equate nil 2019-09-23 16:43:47 +00:00
equal.go proto/equal: equate nil 2019-09-23 16:43:47 +00:00
extension_test.go
extension.go
isinit_test.go proto, internal/impl: implement support for weak fields 2019-09-19 22:41:12 +00:00
isinit.go
merge_test.go proto: fix self-merging 2019-09-23 16:14:39 +00:00
merge.go proto: fix self-merging 2019-09-23 16:14:39 +00:00
messageset_test.go
messageset.go
methods_test.go internal/impl: call Marshal/Unmarshal methods on legacy types 2019-09-26 20:54:39 +00:00
proto_methods.go proto: reset message by default in Unmarshal 2019-09-17 21:13:42 +00:00
proto_reflect.go proto: reset message by default in Unmarshal 2019-09-17 21:13:42 +00:00
proto.go
reset_test.go
reset.go proto: reset message by default in Unmarshal 2019-09-17 21:13:42 +00:00
size_gen.go
size.go
wrappers.go