Skip to content

Commit 91a5345

Browse files
authored
🐛 fix raw type find in json trans tmpl (#13)
1 parent 5ed3d53 commit 91a5345

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugins/common/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func MapperGoTypeNameFromField(ctx *GenContext, field protoreflect.FieldDescript
4040
}
4141
}
4242
typeName := MapperGoTypeNameFromMessage(ctx, field.Message().(protoreflect.MessageDescriptor))
43-
return MapperType{TypeRaw: typeName.GoType(), IsSlice: field.IsList()}
43+
return MapperType{TypeRaw: typeName.TypeRaw, IsSlice: field.IsList(), IsStruct: true}
4444
case protoreflect.EnumKind:
4545
// todo can define if enum map to string or int
4646
return MapperType{TypeRaw: "string"}

0 commit comments

Comments
 (0)