mirror of
https://github.com/beego/bee.git
synced 2024-11-24 13:30:53 +00:00
update the write
This commit is contained in:
parent
cd31fe26ed
commit
e3769549d1
@ -466,7 +466,7 @@ func writeModelFiles(tables []*Table, mPath string, selectedTables map[string]bo
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
f, err = os.OpenFile(fpath, os.O_CREATE, 0666)
|
f, err = os.OpenFile(fpath, os.O_CREATE|os.O_RDWR, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ColorLog("[WARN] %v\n", err)
|
ColorLog("[WARN] %v\n", err)
|
||||||
continue
|
continue
|
||||||
@ -519,7 +519,7 @@ func writeControllerFiles(tables []*Table, cPath string, selectedTables map[stri
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
f, err = os.OpenFile(fpath, os.O_CREATE, 0666)
|
f, err = os.OpenFile(fpath, os.O_CREATE|os.O_RDWR, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ColorLog("[WARN] %v\n", err)
|
ColorLog("[WARN] %v\n", err)
|
||||||
continue
|
continue
|
||||||
@ -574,7 +574,7 @@ func writeRouterFile(tables []*Table, rPath string, selectedTables map[string]bo
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
f, err = os.OpenFile(fpath, os.O_CREATE, 0666)
|
f, err = os.OpenFile(fpath, os.O_CREATE|os.O_RDWR, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ColorLog("[WARN] %v\n", err)
|
ColorLog("[WARN] %v\n", err)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user