From 9b9f4fab34cc3e47e3c7e390d2e2d9c11276d9b3 Mon Sep 17 00:00:00 2001 From: bullgare Date: Tue, 24 Sep 2019 17:18:41 +0300 Subject: [PATCH] Updated Readme.md: file.Close() for template read (#2068) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dfedd8a2..959848dd 100644 --- a/README.md +++ b/README.md @@ -1807,6 +1807,7 @@ func main() { func loadTemplate() (*template.Template, error) { t := template.New("") for name, file := range Assets.Files { + defer file.Close() if file.IsDir() || !strings.HasSuffix(name, ".tmpl") { continue }