Last Updated: May 22, 2026
io.Reader and io.Writer are the two interfaces that hold most of Go's I/O ecosystem together. They're tiny (one method each), but almost every type that produces or consumes bytes in the standard library implements one or both: files, TCP connections, HTTP request bodies, gzip streams, JSON encoders, and in-memory buffers all look the same to code that only cares about reading or writing bytes. This lesson focuses on the two interfaces themselves, their exact contracts, and the composition functions in the io package that let you snap readers and writers together like Lego bricks.