fix bug: release empty struct limit (#96)

This commit is contained in:
Keson
2020-09-22 19:13:46 +08:00
committed by GitHub
parent b628bc0086
commit 9f9c24cce9
2 changed files with 12 additions and 30 deletions

View File

@@ -445,9 +445,6 @@ func (a *PbAst) GenTypesCode() (string, error) {
}
func (s *Struct) genCode(containsTypeStatement bool) (string, error) {
if len(s.Field) == 0 {
return "", nil
}
fields := make([]string, 0)
for _, f := range s.Field {
var comment, doc string