mirror of
https://github.com/beego/bee.git
synced 2024-11-21 23:50:54 +00:00
fix judge sql ext bug
fix orm tag bug change the timestamp file path
This commit is contained in:
parent
9db1e8fb4c
commit
cf3c3bdc8b
@ -18,7 +18,7 @@ const MDateFormat = "20060102_150405"
|
|||||||
|
|
||||||
var DefaultBeegoPro = &Container{
|
var DefaultBeegoPro = &Container{
|
||||||
BeegoProFile: system.CurrentDir + "/beegopro.toml",
|
BeegoProFile: system.CurrentDir + "/beegopro.toml",
|
||||||
TimestampFile: system.CurrentDir + "/beegopro.timestamp",
|
TimestampFile: system.CurrentDir + "/.beegopro.timestamp",
|
||||||
GoModFile: system.CurrentDir + "/go.mod",
|
GoModFile: system.CurrentDir + "/go.mod",
|
||||||
UserOption: UserOption{
|
UserOption: UserOption{
|
||||||
Debug: false,
|
Debug: false,
|
||||||
|
@ -76,7 +76,7 @@ func (c *RenderFile) write(filename string, buf string) (err error) {
|
|||||||
func isNeedOverwrite(fileName string) (flag bool) {
|
func isNeedOverwrite(fileName string) (flag bool) {
|
||||||
seg := "//"
|
seg := "//"
|
||||||
ext := filepath.Ext(fileName)
|
ext := filepath.Ext(fileName)
|
||||||
if ext == "sql" {
|
if ext == ".sql" {
|
||||||
seg = "--"
|
seg = "--"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ func getModelType(orm string) (inputType, goType, mysqlType, tag string) {
|
|||||||
}
|
}
|
||||||
// user set orm tag
|
// user set orm tag
|
||||||
if len(kv) == 2 {
|
if len(kv) == 2 {
|
||||||
tag = orm
|
tag = kv[1]
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user