mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-17 01:12:51 +00:00
e2afdc27e7
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> |
||
---|---|---|
.. | ||
cmd | ||
encoding | ||
errors | ||
flags | ||
impl | ||
pragma | ||
protogen/goldentest | ||
set |