Skip to content

Commit

Permalink
fix go-gorm#1032: add import pkg paths to single query files
Browse files Browse the repository at this point in the history
  • Loading branch information
Nomango authored and tr1v3r committed Jan 16, 2024
1 parent 16a35f1 commit d8e7ed2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func (g *Generator) generateSingleQueryFile(data *genInfo) (err error) {
}
err = render(tmpl.Header, &buf, map[string]interface{}{
"Package": g.queryPkgName,
"ImportPkgPaths": importList.Add(structPkgPath).Add(getImportPkgPaths(data)...).Paths(),
"ImportPkgPaths": importList.Add(g.importPkgPaths...).Add(structPkgPath).Add(getImportPkgPaths(data)...).Paths(),
})
if err != nil {
return err
Expand Down

0 comments on commit d8e7ed2

Please sign in to comment.