protobuf-go/encoding
Herbie Ong 09b28a97f7 encoding/textpb: clean-up code and fix error handling inside closures
In marshalMap, replace Map.Range and sortMap with
internal/mapsort.Range. Also, make sure to capture fatal error properly
for return.

In appendExtensions, capture fatal error properly for return. Added a
testcase that shows this was a bug.

In unmarshalAny, remove unnecessary checks and use internal/fieldnum for
Any's field numbers.

Change-Id: Id8574d5b4eb820ad961f6ad5e886f8ae2e9b90f0
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/170627
Reviewed-by: Damien Neil <dneil@google.com>
2019-04-04 00:03:54 +00:00
..
jsonpb encoding/jsonpb,textpb: fix handling of duplicate oneof fields 2019-04-03 06:57:53 +00:00
testprotos encoding/textpb: clean-up code and fix error handling inside closures 2019-04-04 00:03:54 +00:00
textpb encoding/textpb: clean-up code and fix error handling inside closures 2019-04-04 00:03:54 +00:00