Skip to content

Commit

Permalink
Fix minor mistake in parseSubscript
Browse files Browse the repository at this point in the history
  • Loading branch information
jchadwick-buf committed Nov 25, 2024
1 parent 7e20e7a commit a4d7e11
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ func parseSubscript(
if err := parseMapKey(descriptor, subscript, element); err != nil {
return nil, err
}
descriptor = descriptor.MapValue()
element.KeyType = descriptorpb.FieldDescriptorProto_Type(descriptor.MapKey().Kind()).Enum()
element.ValueType = descriptorpb.FieldDescriptorProto_Type(descriptor.MapValue().Kind()).Enum()
descriptor = descriptor.MapValue()
default:
return nil, fmt.Errorf("unexpected subscript on field %s", name)
}
Expand Down

0 comments on commit a4d7e11

Please sign in to comment.