Skip to content

Commit

Permalink
fix: skip with there are not constructor need generate
Browse files Browse the repository at this point in the history
  • Loading branch information
Bin-Huang committed Aug 9, 2022
1 parent 9e16a05 commit 2d63ca6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func main() {
allImports = append(allImports, imports...)
allResults = append(allResults, results...)
}
if len(allResults) == 0 {
return
}
code, err := GenerateCode(pkg.Name, allImports, allResults)
if err != nil {
panic(err)
Expand Down

0 comments on commit 2d63ca6

Please sign in to comment.