fix (helper): fix goTypeWithPackage enum case

This commit is contained in:
Anastasia DERUELLE 2017-08-30 14:46:45 +02:00 committed by Pierre Roullon
parent 19fd9d7959
commit ee845f3ed6

View File

@ -170,7 +170,7 @@ func isFieldRepeated(f *descriptor.FieldDescriptorProto) bool {
func goTypeWithPackage(f *descriptor.FieldDescriptorProto) string {
pkg := ""
if *f.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE {
if *f.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE || *f.Type == descriptor.FieldDescriptorProto_TYPE_ENUM {
pkg = getPackageTypeName(*f.TypeName)
}
return goType(pkg, f)