From 649e4ab8b3ce19768402364aafd3fa9fdff95bd8 Mon Sep 17 00:00:00 2001 From: guangwu Date: Tue, 14 May 2024 16:46:13 +0800 Subject: [PATCH] fix: close file --- cmd/wayback/wayback.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/wayback/wayback.go b/cmd/wayback/wayback.go index 53055121..1ac3cc2b 100644 --- a/cmd/wayback/wayback.go +++ b/cmd/wayback/wayback.go @@ -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())