fix: close file

This commit is contained in:
guangwu 2024-05-08 15:10:46 +08:00 committed by GitHub
parent 47700463f4
commit c74e784ac1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,6 +71,7 @@ func (t *Template) RenderToLocal() error {
if err != nil {
return err
}
defer f.Close()
if err := t.template.Execute(f, t.data); err != nil {
return err