io.Reader
As mentioned above the io.Reader
is an important interface in the language Go. A lot(if not all) functions that need to read from something take an io.Reader
as input. To fulfill the interface a type needs to implement that one method.The writing side io.Writer
, has the Write
method.
If you think of a new type in your program or package and you make it fulfill the io.Reader
or io.Writer
interface, the whole standard Go library can be used on that type!
当前内容版权归 Miek Gieben 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Miek Gieben .