0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2025-01-06 22:40:31 -05:00

templates: Close files after done including them

This commit is contained in:
Matthew Holt 2015-07-01 11:36:37 -06:00
parent 4d066b7e30
commit 915172e9ef

View file

@ -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 {