From c6b082a6263bbfcfab0dcc4f4c4bb2c024c84f10 Mon Sep 17 00:00:00 2001 From: Wang Guoliang Date: Fri, 24 Nov 2017 22:43:25 +0800 Subject: Replace strings.Index with strings.Contains --- template.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'template.go') diff --git a/template.go b/template.go index 1826fd7..60b076b 100644 --- a/template.go +++ b/template.go @@ -254,9 +254,7 @@ func templateChainDependencies(template Template) []Template { requires := template.Templates() chain := make([]Template, len(requires)*2) for _, req := range requires { - for _, sub := range templateChainDependencies(req) { - chain = append(chain, sub) - } + chain = append(chain, templateChainDependencies(req)...) } chain = append(chain, template) return chain -- cgit v1.2.1-24-ge1ad