mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 20:50:54 +00:00
files is []string, use len(files)==0
This commit is contained in:
parent
877b5c233e
commit
38ddb61199
@ -148,7 +148,7 @@ func BuildTemplate(dir string, files... string) error {
|
|||||||
}
|
}
|
||||||
for _, v := range self.files {
|
for _, v := range self.files {
|
||||||
for _, file := range v {
|
for _, file := range v {
|
||||||
if (files == nil || utils.InSlice(file, files)) {
|
if (len(files) == 0 || utils.InSlice(file, files)) {
|
||||||
t, err := getTemplate(self.root, file, v...)
|
t, err := getTemplate(self.root, file, v...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Trace("parse template err:", file, err)
|
Trace("parse template err:", file, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user