all: rename ExtensionType Descriptor method to TypeDescriptor (1/2)
Descriptor methods generally return a Descriptor with no Go type
information. ExtensionType's Descriptor is an exception, returning an
ExtensionTypeDescriptor containing both the proto descriptor and a
reference back to the ExtensionType. The pure descriptor is accessed
by xt.Descriptor().Descriptor().
Rename ExtensionType's Descriptor method to TypeDescriptor to make it
clear that it behaves a bit differently.
Change 1/2: Add the TypeDescriptor method and deprecate Descriptor.
Change-Id: I1806095044d35a474d60f94d2a28bdf528f12238
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/192139
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
diff --git a/testing/prototest/prototest.go b/testing/prototest/prototest.go
index 9ff58f9..fbfe7c6 100644
--- a/testing/prototest/prototest.go
+++ b/testing/prototest/prototest.go
@@ -47,7 +47,7 @@
})
}
for _, xt := range opts.ExtensionTypes {
- testField(t, m1, xt.Descriptor())
+ testField(t, m1, xt.TypeDescriptor())
}
for i := 0; i < md.Oneofs().Len(); i++ {
testOneof(t, m1, md.Oneofs().Get(i))