Skip to content

Commit

Permalink
Merge pull request #87 from testwill/close_file
Browse files Browse the repository at this point in the history
fix: close input file
  • Loading branch information
bishopfaure authored Jun 4, 2024
2 parents d9cbefd + ca810a0 commit 3759d2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/array.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ func LoadFileLinesIntoArray(input string) []string {
if err != nil {
return []string{input}
}
defer file.Close()

scanner := bufio.NewScanner(file)
scanner.Split(bufio.ScanLines)
Expand Down

0 comments on commit 3759d2c

Please sign in to comment.