From 915172e9efcb54f9c277d1e75c0dc3eae8b83233 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 1 Jul 2015 11:36:37 -0600 Subject: [PATCH] templates: Close files after done including them --- middleware/templates/context.go | 1 + 1 file changed, 1 insertion(+) diff --git a/middleware/templates/context.go b/middleware/templates/context.go index 6f23e7f3..4f125c99 100644 --- a/middleware/templates/context.go +++ b/middleware/templates/context.go @@ -28,6 +28,7 @@ func (c context) Include(filename string) (string, error) { if err != nil { return "", err } + defer file.Close() body, err := ioutil.ReadAll(file) if err != nil {