summaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/protobuf/internal/order/order.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/google.golang.org/protobuf/internal/order/order.go')
-rw-r--r--vendor/google.golang.org/protobuf/internal/order/order.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/vendor/google.golang.org/protobuf/internal/order/order.go b/vendor/google.golang.org/protobuf/internal/order/order.go
index 2a24953f6a..33745ed062 100644
--- a/vendor/google.golang.org/protobuf/internal/order/order.go
+++ b/vendor/google.golang.org/protobuf/internal/order/order.go
@@ -5,12 +5,12 @@
package order
import (
- pref "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoreflect"
)
// FieldOrder specifies the ordering to visit message fields.
// It is a function that reports whether x is ordered before y.
-type FieldOrder func(x, y pref.FieldDescriptor) bool
+type FieldOrder func(x, y protoreflect.FieldDescriptor) bool
var (
// AnyFieldOrder specifies no specific field ordering.
@@ -18,9 +18,9 @@ var (
// LegacyFieldOrder sorts fields in the same ordering as emitted by
// wire serialization in the github.com/golang/protobuf implementation.
- LegacyFieldOrder FieldOrder = func(x, y pref.FieldDescriptor) bool {
+ LegacyFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool {
ox, oy := x.ContainingOneof(), y.ContainingOneof()
- inOneof := func(od pref.OneofDescriptor) bool {
+ inOneof := func(od protoreflect.OneofDescriptor) bool {
return od != nil && !od.IsSynthetic()
}
@@ -41,14 +41,14 @@ var (
}
// NumberFieldOrder sorts fields by their field number.
- NumberFieldOrder FieldOrder = func(x, y pref.FieldDescriptor) bool {
+ NumberFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool {
return x.Number() < y.Number()
}
// IndexNameFieldOrder sorts non-extension fields before extension fields.
// Non-extensions are sorted according to their declaration index.
// Extensions are sorted according to their full name.
- IndexNameFieldOrder FieldOrder = func(x, y pref.FieldDescriptor) bool {
+ IndexNameFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool {
// Non-extension fields sort before extension fields.
if x.IsExtension() != y.IsExtension() {
return !x.IsExtension() && y.IsExtension()
@@ -64,7 +64,7 @@ var (
// KeyOrder specifies the ordering to visit map entries.
// It is a function that reports whether x is ordered before y.
-type KeyOrder func(x, y pref.MapKey) bool
+type KeyOrder func(x, y protoreflect.MapKey) bool
var (
// AnyKeyOrder specifies no specific key ordering.
@@ -72,7 +72,7 @@ var (
// GenericKeyOrder sorts false before true, numeric keys in ascending order,
// and strings in lexicographical ordering according to UTF-8 codepoints.
- GenericKeyOrder KeyOrder = func(x, y pref.MapKey) bool {
+ GenericKeyOrder KeyOrder = func(x, y protoreflect.MapKey) bool {
switch x.Interface().(type) {
case bool:
return !x.Bool() && y.Bool()