From 4a53e0ce5ab1cb6521692102c811b80baa081e52 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Tue, 4 Jul 2023 16:01:47 +0200 Subject: [PATCH] remove panic from skipThisFile --- libs/template/helpers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/template/helpers.go b/libs/template/helpers.go index 27f829ee2..ffca0828f 100644 --- a/libs/template/helpers.go +++ b/libs/template/helpers.go @@ -8,8 +8,9 @@ import ( var errSkipThisFile = errors.New("skip generating this file") var HelperFuncs = template.FuncMap{ + // Text template execution returns the error only if it's the second return + // value from a function: https://pkg.go.dev/text/template#hdr-Pipelines "skipThisFile": func() (any, error) { return nil, errSkipThisFile - // panic(errSkipThisFile) }, }