Commit 38ddb611 authored by wulove's avatar wulove

files is []string, use len(files)==0

parent 877b5c23
......@@ -148,7 +148,7 @@ func BuildTemplate(dir string, files... string) error {
}
for _, v := range self.files {
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...)
if err != nil {
Trace("parse template err:", file, err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment