mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2024-12-29 12:17:48 +00:00
204f1c0ad8
Add a method to fetch descriptor options. Since options are proto messages (e.g., google.protobuf.FieldOptions), and proto message packages depend on the protoreflect package, returning the actual option type would cause a dependency cycle. Instead, we return an interface value which can be type asserted to the appropriate concrete type. Add options support to the prototype package. Some of the prototype constructors included fields (such as Field.IsPacked) which represent information from the options (such as google.protobuf.FieldOptions.packed). To avoid confusion about the canonical source of information, drop these fields in favor of the options. Drop the unimplemented Descriptor.DescriptorOptionsProto. Change-Id: I66579b6a7d10d99eb6977402a247306a78913e74 Reviewed-on: https://go-review.googlesource.com/c/144277 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> |
||
---|---|---|
.. | ||
pbdump_test.go | ||
pbdump.go |