Skip to content

Commit

Permalink
defer file close
Browse files Browse the repository at this point in the history
  • Loading branch information
snowmerak committed Sep 28, 2023
1 parent a7f7158 commit 8bead09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/executor/generate/bean.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ func BeanContainer(root string) error {
if err != nil {
return err
}
defer func(f *os.File) {
if err := f.Close(); err != nil {
panic(err)
}
}(f)

pkg := &model.Package{
Name: "bean",
Expand Down

0 comments on commit 8bead09

Please sign in to comment.