1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 03:50:51 +00:00

refactor(Template): a detailed description of the error

This commit is contained in:
Viktor Vassilyev 2018-11-07 20:20:10 +06:00
parent aa6d0f9f0b
commit 9ac4928113

View File

@ -323,12 +323,13 @@ func _getTemplate(t0 *template.Template, root string, fs http.FileSystem, subMod
f, err := fs.Open(fileAbsPath)
if err != nil {
f.Close()
logs.Trace("template file parse error, not success open file:", err)
continue
}
data, err = ioutil.ReadAll(f)
f.Close()
if err != nil {
logs.Trace("template parse file err:", err)
logs.Trace("template file parse error, not success read file:", err)
continue
}
reg := regexp.MustCompile(BConfig.WebConfig.TemplateLeft + "[ ]*define[ ]+\"([^\"]+)\"")