The bytes, strings, and regexp packages provide functions for replacing text in strings and byte slices. These only operate on strings and byte slices that are in memory. I propose a new golang.org/x/text/replace package which implements golang.org/x/text/transform.Transformer's for replacing text. These would enable doing text replacements on io.Readers.
prototype: https://github.com/icholy/replace