Fix code generation (#1897)

This commit is contained in:
anqiansong
2022-05-13 00:16:17 +08:00
committed by GitHub
parent 3ae874d75d
commit f486685e99
2 changed files with 15 additions and 1 deletions

View File

@@ -65,7 +65,7 @@ func NewDefaultGenerator(dir string, cfg *config.Config, opt ...Option) (*defaul
}
dir = dirAbs
pkg := filepath.Base(dirAbs)
pkg := util.SafeString(filepath.Base(dirAbs))
err = pathx.MkdirIfNotExist(dir)
if err != nil {
return nil, err