Skip to content

Commit

Permalink
add missing file close
Browse files Browse the repository at this point in the history
  • Loading branch information
mauri870 committed Feb 12, 2025
1 parent a202d20 commit eb2571a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions file/rotator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ func AssertDirContents(t *testing.T, dir string, files ...string) {
if err != nil {
t.Fatal(err)
}
defer f.Close()

names, err := f.Readdirnames(-1)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions logp/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ func assertDirContents(t *testing.T, dir string, files ...string) {
if err != nil {
t.Fatal(err)
}
defer f.Close()

names, err := f.Readdirnames(-1)
if err != nil {
Expand Down

0 comments on commit eb2571a

Please sign in to comment.