From 9d1c501b4341ca2012085d21261e674b8de56fc5 Mon Sep 17 00:00:00 2001 From: Davide Oddone Date: Fri, 1 Dec 2023 22:00:41 +0100 Subject: [PATCH] Closed the file after opening --- 20231201/trebuchet.go | 1 + 1 file changed, 1 insertion(+) diff --git a/20231201/trebuchet.go b/20231201/trebuchet.go index 409eca4..f57a603 100644 --- a/20231201/trebuchet.go +++ b/20231201/trebuchet.go @@ -110,6 +110,7 @@ func CombineIndexes(s string) int { func main() { file, err := os.Open("input") check(err) + defer file.Close() var firstTotal int = 0 var secondTotal int = 0