protobuf-go/internal
Joe Tsai e2afdc27e7 internal/impl: support legacy unknown fields
Add wrapper data structures to get legacy XXX_unrecognized fields to support
the new protoreflect.UnknownFields interface. This is a challenge since the
field is a []byte, which does not give us much flexibility to work with
in terms of choice of data structures.

This implementation is relatively naive where every operation is O(n) since
it needs to strip through the entire []byte each time. The Range operation
operates slightly differently from ranging over Go maps since it presents a
stale version of RawFields should a mutation occur while ranging.
This distinction is unlikely to affect anyone in practice.

Change-Id: Ib3247cb827f9a0dd6c2192cd59830dca5eef8257
Reviewed-on: https://go-review.googlesource.com/c/144697
Reviewed-by: Damien Neil <dneil@google.com>
2018-10-26 19:55:21 +00:00
..
cmd reflect/protoreflect: add Descriptor.Options method 2018-10-23 23:44:11 +00:00
encoding reflect/protoreflect: add Descriptor.Options method 2018-10-23 23:44:11 +00:00
errors
flags internal/flags: add package to control specialized functionality 2018-08-03 22:59:53 +00:00
impl internal/impl: support legacy unknown fields 2018-10-26 19:55:21 +00:00
pragma internal/pragma: package to statically enforce certain properties 2018-08-06 21:47:01 +00:00
protogen/goldentest protogen: generate .meta file with code annotations 2018-10-16 17:22:41 +00:00
set internal/set: add set package for set data structures 2018-08-09 21:46:35 +00:00