mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-17 01:12:51 +00:00
febffdd88e
Remove the requirement that all registered files have unique names. Files.FindFileByPath now returns an error if multiple files match the path. Files.RangeFiles iterates over all files, including ones with the same name. Unlike descriptor names, file names are not part of any of the wire encodings. Conflicts in file names only affect file lookups by path, which is an uncommon operation. The Files.RegisterFile documentation already states (inaccurately), "It is permitted for multiple files to have the same file path." This change brings the behavior of RegisterFile in line with the documentation. Fixes golang/protobuf#1122 Change-Id: I2750e35736fd34def23fa6ab6d6a829095a65a26 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/321531 Trust: Damien Neil <dneil@google.com> Run-TryBot: Damien Neil <dneil@google.com> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> |
||
---|---|---|
.. | ||
registry_test.go | ||
registry.go |