protobuf-go/internal/cmd
Joe Tsai fb30439f55 testing/protopack: add Message.UnmarshalAbductive
The protobuf wire format is insufficiently self-decribing such that
it is impossible to know whether for sure whether an unknown bytes value
is a sub-message or not. However, protopack is primarily used for debugging
where a best-effort guess is still very useful.

The Message.UnmarshalAbductive unmarshals an unknown bytes value as a message
if it is syntactically well-formed. Otherwise, it is left as is.

Change-Id: I5e2b4b995e2b5eb60942a242558bf4cea1da9891
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/309669
Trust: Joe Tsai <joetsai@digital-static.net>
Reviewed-by: Damien Neil <dneil@google.com>
2021-04-14 20:38:42 +00:00
..
generate-corpus internal/fuzz: add fuzzers for prototext and protojson packages 2019-12-20 09:02:05 +00:00
generate-protos all: update protobuf toolchain dependency 2021-03-03 01:59:11 +00:00
generate-types internal/cmd/generate-types: use ConsumeBytes instead of ConsumeString 2020-10-20 20:17:50 +00:00
pbdump testing/protopack: add Message.UnmarshalAbductive 2021-04-14 20:38:42 +00:00