fix #2301,package conflict generated by ddl (#2307)

Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
yiGmMk
2022-08-27 21:56:39 +08:00
committed by GitHub
parent 2d60f0c65a
commit fb6d7e2fd2
2 changed files with 43 additions and 1 deletions

View File

@@ -144,7 +144,7 @@ func (g *defaultGenerator) createFile(modelList map[string]*codeTuple) error {
}
g.dir = dirAbs
g.pkg = filepath.Base(dirAbs)
g.pkg = util.SafeString(filepath.Base(dirAbs))
err = pathx.MkdirIfNotExist(dirAbs)
if err != nil {
return err