mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-04-16 08:42:29 +00:00
all: fix stale comments
Change-Id: I4bfef75bc74c8d876a3926635bea12bbbaf4993e Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/185238 Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
parent
8a4c3d18b1
commit
a804450cf6
@ -17,8 +17,6 @@ import (
|
|||||||
"google.golang.org/protobuf/types/descriptorpb"
|
"google.golang.org/protobuf/types/descriptorpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: Add support for proto options.
|
|
||||||
|
|
||||||
func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileInfo) {
|
func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileInfo) {
|
||||||
g.P("var ", f.GoDescriptorIdent, " ", protoreflectPackage.Ident("FileDescriptor"))
|
g.P("var ", f.GoDescriptorIdent, " ", protoreflectPackage.Ident("FileDescriptor"))
|
||||||
g.P()
|
g.P()
|
||||||
|
@ -90,14 +90,11 @@ var (
|
|||||||
aberrantMessageDescCache map[reflect.Type]protoreflect.MessageDescriptor
|
aberrantMessageDescCache map[reflect.Type]protoreflect.MessageDescriptor
|
||||||
)
|
)
|
||||||
|
|
||||||
// aberrantLoadEnumDesc returns an EnumDescriptor derived from the Go type,
|
// aberrantLoadMessageDesc returns an EnumDescriptor derived from the Go type,
|
||||||
// which must not implement protoreflect.ProtoMessage or messageV1.
|
// which must not implement protoreflect.ProtoMessage or messageV1.
|
||||||
//
|
//
|
||||||
// This is a best-effort derivation of the message descriptor using the protobuf
|
// This is a best-effort derivation of the message descriptor using the protobuf
|
||||||
// tags on the struct fields.
|
// tags on the struct fields.
|
||||||
//
|
|
||||||
// The finalized flag determines whether the returned message descriptor must
|
|
||||||
// be fully initialized.
|
|
||||||
func aberrantLoadMessageDesc(t reflect.Type) pref.MessageDescriptor {
|
func aberrantLoadMessageDesc(t reflect.Type) pref.MessageDescriptor {
|
||||||
aberrantMessageDescLock.Lock()
|
aberrantMessageDescLock.Lock()
|
||||||
defer aberrantMessageDescLock.Unlock()
|
defer aberrantMessageDescLock.Unlock()
|
||||||
|
@ -27,8 +27,6 @@ type Descriptor interface {
|
|||||||
// Support for this functionality is optional and may return nil.
|
// Support for this functionality is optional and may return nil.
|
||||||
ParentFile() FileDescriptor
|
ParentFile() FileDescriptor
|
||||||
|
|
||||||
// TODO: Switch the signature of Parent to drop the bool.
|
|
||||||
|
|
||||||
// Parent returns the parent containing this descriptor declaration.
|
// Parent returns the parent containing this descriptor declaration.
|
||||||
// The following shows the mapping from child type to possible parent types:
|
// The following shows the mapping from child type to possible parent types:
|
||||||
//
|
//
|
||||||
|
@ -22,8 +22,6 @@ type ExtensionDescV1 struct {
|
|||||||
// Type is the descriptor type for the extension field using the v2 API.
|
// Type is the descriptor type for the extension field using the v2 API.
|
||||||
// If populated, the information in this field takes precedence over
|
// If populated, the information in this field takes precedence over
|
||||||
// all other fields in ExtensionDescV1.
|
// all other fields in ExtensionDescV1.
|
||||||
//
|
|
||||||
// TODO: Delete this and make this whole struct implement ExtensionDescV1.
|
|
||||||
Type protoreflect.ExtensionType
|
Type protoreflect.ExtensionType
|
||||||
|
|
||||||
// ExtendedType is a typed nil-pointer to the parent message type that
|
// ExtendedType is a typed nil-pointer to the parent message type that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user