feat: fix issues

This commit is contained in:
Rogee
2024-12-25 18:17:36 +08:00
parent 2ec0c73ba3
commit 21215d3d5c
2 changed files with 7 additions and 7 deletions

View File

@@ -97,8 +97,8 @@ func commandGenModelE(cmd *cobra.Command, args []string) error {
typeName := splits[len(splits)-1] typeName := splits[len(splits)-1]
pkg := splits[0] pkg := splits[0]
if strings.HasPrefix(pkg, "/") { if strings.HasPrefix(pkg, "~") {
pkg = gomod.GetModuleName() + pkg pkg = strings.Replace(pkg, "~", gomod.GetModuleName(), 1)
} }
pkgSplits := strings.Split(splits[0], "/") pkgSplits := strings.Split(splits[0], "/")

View File

@@ -1,5 +1,5 @@
# ignores: [] # ignore tables // ignores: [] # ignore tables
# types: // types:
# users: # table name // users: # table name
# oauth: {{.ModuleName}}/pkg/pg.UserOAuth // meta: ~/database/fields.UserMeta
#