Use io.ReadWriteCloser

Relevant to #5