From 38ddb61199f7ab90bfa7265a3b6cd68ecfb81c76 Mon Sep 17 00:00:00 2001 From: wulove Date: Fri, 21 Aug 2015 10:32:53 +0800 Subject: [PATCH] files is []string, use len(files)==0 --- template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.go b/template.go index 45ecbe52..32468d77 100644 --- a/template.go +++ b/template.go @@ -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)