Skip to content

Commit

Permalink
fix: close file
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored May 14, 2024
1 parent 8a9bdd4 commit 649e4ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/wayback/wayback.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func readFromFile(s string) (urls []*url.URL) {
if err != nil {
return
}
defer file.Close()
scanner := bufio.NewScanner(file)
for scanner.Scan() {
uri, err := url.Parse(scanner.Text())
Expand Down

0 comments on commit 649e4ab

Please sign in to comment.