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:
parent
4d066b7e30
commit
915172e9ef
1 changed files with 1 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue