mirror of
https://github.com/caddyserver/caddy.git
synced 2025-03-21 19:13:50 +03: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 {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
body, err := ioutil.ReadAll(file)
|
body, err := ioutil.ReadAll(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue