summaryrefslogtreecommitdiffstats
path: root/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/google.golang.org/protobuf/internal/filedesc/desc.go')
-rw-r--r--vendor/google.golang.org/protobuf/internal/filedesc/desc.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
index 2540befd..9385126f 100644
--- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
+++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
@@ -13,6 +13,7 @@ import (
"google.golang.org/protobuf/internal/descfmt"
"google.golang.org/protobuf/internal/descopts"
"google.golang.org/protobuf/internal/encoding/defval"
+ "google.golang.org/protobuf/internal/genid"
"google.golang.org/protobuf/internal/pragma"
"google.golang.org/protobuf/internal/strs"
pref "google.golang.org/protobuf/reflect/protoreflect"
@@ -302,13 +303,13 @@ func (fd *Field) MapKey() pref.FieldDescriptor {
if !fd.IsMap() {
return nil
}
- return fd.Message().Fields().ByNumber(1)
+ return fd.Message().Fields().ByNumber(genid.MapEntry_Key_field_number)
}
func (fd *Field) MapValue() pref.FieldDescriptor {
if !fd.IsMap() {
return nil
}
- return fd.Message().Fields().ByNumber(2)
+ return fd.Message().Fields().ByNumber(genid.MapEntry_Value_field_number)
}
func (fd *Field) HasDefault() bool { return fd.L1.Default.has }
func (fd *Field) Default() pref.Value { return fd.L1.Default.get(fd) }