1
0
mirror of https://github.com/beego/bee.git synced 2025-06-26 19:10:19 +00:00

add dev githook command

This commit is contained in:
Ming Deng
2020-10-09 23:33:58 +08:00
parent f5665162f7
commit e0fd237002
22 changed files with 150 additions and 33 deletions

View File

@ -123,7 +123,7 @@ func (r *RenderFile) Exec(name string) {
var orgContent []byte
if err == nil {
if org, err := os.OpenFile(r.Descriptor.DstPath, os.O_RDONLY, 0666); err == nil {
orgContent,_ = ioutil.ReadAll(org)
orgContent, _ = ioutil.ReadAll(org)
org.Close()
} else {
beeLogger.Log.Infof("file err %s", err)
@ -151,4 +151,3 @@ func (r *RenderFile) Exec(name string) {
beeLogger.Log.Infof("create file '%s' from %s", r.FlushFile, r.PackageName)
}
}