Browse Source

fix judge sql ext bug

fix orm tag bug
change the timestamp file path
pull/690/head
yitea 4 months ago
parent
commit
cf3c3bdc8b
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      internal/app/module/beegopro/container.go
  2. +2
    -2
      internal/app/module/beegopro/util.go

+ 1
- 1
internal/app/module/beegopro/container.go View File

@ -18,7 +18,7 @@ const MDateFormat = "20060102_150405"
var DefaultBeegoPro = &Container{
BeegoProFile: system.CurrentDir + "/beegopro.toml",
TimestampFile: system.CurrentDir + "/beegopro.timestamp",
TimestampFile: system.CurrentDir + "/.beegopro.timestamp",
GoModFile: system.CurrentDir + "/go.mod",
UserOption: UserOption{
Debug: false,

+ 2
- 2
internal/app/module/beegopro/util.go View File

@ -76,7 +76,7 @@ func (c *RenderFile) write(filename string, buf string) (err error) {
func isNeedOverwrite(fileName string) (flag bool) {
seg := "//"
ext := filepath.Ext(fileName)
if ext == "sql" {
if ext == ".sql" {
seg = "--"
}
@ -179,7 +179,7 @@ func getModelType(orm string) (inputType, goType, mysqlType, tag string) {
}
// user set orm tag
if len(kv) == 2 {
tag = orm
tag = kv[1]
}
return
}

Loading…
Cancel
Save