protobuf-go/internal
Joe Tsai 2d5a169f75 internal/impl: use linked-list for unknown field ordering
Unknown fields follow a policy where the latest field takes precedence when
it comes to the ordering. However, the current implementation is incorrect
as it uses a slice and simply swaps the current entry with the last entry.
While this ensures that the latest field seen remains last, it does not ensure
that the swapped out entry is second-to-last.

To provide the desired behavior, a linked-list is used.
For simplicity, we use the list package in the standard library even if it
is neither the most performant nor type safe.

Change-Id: I675145c61f6b5b624ed9e94bbe2251b5a71e2c48
Reviewed-on: https://go-review.googlesource.com/c/145241
Reviewed-by: Damien Neil <dneil@google.com>
2018-10-31 18:39:54 +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 internal/errors: initial commit 2018-08-02 18:28:47 +00:00
flags internal/flags: add package to control specialized functionality 2018-08-03 22:59:53 +00:00
impl internal/impl: use linked-list for unknown field ordering 2018-10-31 18:39:54 +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