Closed the file after opening

This commit is contained in:
Davide Oddone 2023-12-01 22:00:41 +01:00
parent a5d31a6f03
commit 9d1c501b43

View File

@ -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