Merge pull request #60 from moul/dev/jhayotte/gotype

get package name only for descriptor message typed
This commit is contained in:
Manfred Touron 2017-05-03 06:41:38 +02:00 committed by GitHub
commit c750f5de81

View File

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