From ee845f3ed67c6aba6e47383ba2c3f5d4f0545c9a Mon Sep 17 00:00:00 2001 From: Anastasia DERUELLE Date: Wed, 30 Aug 2017 14:46:45 +0200 Subject: [PATCH] fix (helper): fix goTypeWithPackage enum case --- helpers/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/helpers.go b/helpers/helpers.go index fd9612d..4ec1406 100644 --- a/helpers/helpers.go +++ b/helpers/helpers.go @@ -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)