Skip to content

Commit

Permalink
fix: close file (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored Jun 20, 2024
1 parent f4ac349 commit dcab42e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions derive/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ func newPackage(program *loader.Program, pkgInfo *loader.PackageInfo, plugins []
if err != nil {
return nil, fmt.Errorf("opening %s: %v", fileInfo.fullpath, err)
}
defer f.Close()
if err := format.Node(f, program.Fset, fileInfo.astFile); err != nil {
return nil, fmt.Errorf("formatting %s: %v", fileInfo.fullpath, err)
}
Expand Down

0 comments on commit dcab42e

Please sign in to comment.