Readers
The io
package specifies the io.Reader
interface, which represents the read end of a stream of data.
The io.Reader
interface has a Read
method as follows:
Read
populates the given byte slice with data and returns the number of bytes populated and an error value. It returns an io.EOF
error when the stream ends.
Example
Last updated