Go
Read a file with Go
You could also:
- Use
ioutil.ReadFile
to read the whole file into memory. - Use a buffer with
bufio.NewReader
to read the file line by line.
You could also:
ioutil.ReadFile
to read the whole file into memory.bufio.NewReader
to read the file line by line.