There was an error while loading. Please reload this page.
1 parent 81790ab commit 82e7f55Copy full SHA for 82e7f55
BufIO/BufferedIO.go
@@ -35,7 +35,7 @@ func ReadFile(filename string) {
35
defer f.Close()
36
scanner := bufio.NewScanner(f)
37
for scanner.Scan() {
38
-fmt.Println(scanner.Text())
+fmt.Println(scanner.Text()) // read as long there are strings
39
}
40
if err := scanner.Err(); err != nil {
41
panic(err.Error()) // error handling
0 commit comments