Input and readers

Incoming streams of data are considered the io.Reader interface if the application has no control over the data flow, and will wait for an error to end the process, receiving the io.EOF value in the best case scenario, which is a special error that signals that there is no more content to read, or another error otherwise. The other option is that the reader is also capable of terminating the stream. In this case, the correct representation is the io.ReadCloser interface. 

Besides os.File, there are several implementations of readers spread across the standard package.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.144.170