Skip to content

Commit 5c9e057

Browse files
committed
AoC 2024, Day 1: Error handling
1 parent c88efed commit 5c9e057

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

go/2024/day01.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@ func main() {
2020
for scanner.Scan() {
2121
fmt.Println(scanner.Text())
2222
}
23+
24+
if err := scanner.Err(); err != nil {
25+
panic(err)
26+
}
2327
}

0 commit comments

Comments
 (0)