Skip to content

Commit

Permalink
fix: close input file
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored May 11, 2024
1 parent d9cbefd commit ca810a0
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 ca810a0

Please sign in to comment.