We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0af257d commit c88efedCopy full SHA for c88efed
go/2024/day01.go
@@ -1,7 +1,23 @@
1
package main
2
3
-import "fmt"
+import (
4
+ "bufio"
5
+ "fmt"
6
+ "os"
7
+)
8
9
func main() {
- fmt.Println("hello world")
10
+ fi, err := os.Open("day01.txt")
11
+
12
+ if err != nil {
13
+ panic(err)
14
+ }
15
16
+ defer fi.Close()
17
18
+ scanner := bufio.NewScanner(fi)
19
20
+ for scanner.Scan() {
21
+ fmt.Println(scanner.Text())
22
23
}
0 commit comments