vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go
changeset 260 445e01aede7e
parent 256 6d9efbef00a9
equal deleted inserted replaced
259:db4911b0c721 260:445e01aede7e
   153 // findDescriptor finds the descriptor by name,
   153 // findDescriptor finds the descriptor by name,
   154 // which may be a relative name within some scope.
   154 // which may be a relative name within some scope.
   155 //
   155 //
   156 // Suppose the scope was "fizz.buzz" and the reference was "Foo.Bar",
   156 // Suppose the scope was "fizz.buzz" and the reference was "Foo.Bar",
   157 // then the following full names are searched:
   157 // then the following full names are searched:
   158 //	* fizz.buzz.Foo.Bar
   158 //   - fizz.buzz.Foo.Bar
   159 //	* fizz.Foo.Bar
   159 //   - fizz.Foo.Bar
   160 //	* Foo.Bar
   160 //   - Foo.Bar
   161 func (r *resolver) findDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.Descriptor, error) {
   161 func (r *resolver) findDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.Descriptor, error) {
   162 	if !ref.IsValid() {
   162 	if !ref.IsValid() {
   163 		return nil, errors.New("invalid name reference: %q", ref)
   163 		return nil, errors.New("invalid name reference: %q", ref)
   164 	}
   164 	}
   165 	if ref.IsFull() {
   165 	if ref.IsFull() {