file, _ := os.Open(path)
defer inFile.Close()
scanner := bufio.NewScanner(file) {
scanner.Split(bufio.ScanLines)
}
for scanner.Scan() {
fmt.Println(scanner.Text())
}
Last active
March 22, 2018 08:26
-
-
Save kevsersrca/2c29f53f2eeaf41fb43cbe624f5c95b3 to your computer and use it in GitHub Desktop.
golang file read
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment