commit | 5366f825ad2b934621019da5ceadb00fc94e2e4a | [log] [tgz] |
---|---|---|
author | Damien Neil <dneil@google.com> | Thu Dec 05 14:54:35 2019 -0800 |
committer | Damien Neil <dneil@google.com> | Mon Dec 09 17:33:50 2019 +0000 |
tree | 00f8f5e3b82b6f692e8880cc1118560cb9762042 | |
parent | 9f1165c3bf7be5c8bd70ca9b3853074dac3eb3d2 [diff] |
proto: consistently use non-nil, zero-length []bytes for empty bytes strings The fast-path decoder decodes zero-length repeated bytes values as non-nil, zero-length []bytes. Do the same in the reflection decoder. This isn't really a correctness issue, since there's no ambiguity about what a nil entry in a [][]byte means. Still a good idea for consistency, and retains v1 behavior. Change-Id: Icd2cb726d14ff1f2b9f142e65756777a359971f3 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/210257 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
WARNING: This repository is in active development. There are no guarantees about API stability. Breaking changes will occur until a stable release is made and announced.
This repository is for the development of the next major Go implementation of protocol buffers. This library makes breaking API changes relative to the existing Go protobuf library. Of particular note, this API aims to make protobuf reflection a first-class feature of the API and implements the protobuf ecosystem in terms of reflection.
List of relevant design documents:
We appreciate community contributions. See CONTRIBUTING.md.
Issues regarding the new API can be filed at github.com/golang/protobuf. Please use a APIv2:
prefix in the title to make it clear that the issue is regarding the new API work.