// JoinMessages concatenates received messages to create a single io.Reader. // The string term is appended to each message. The returned reader does not // support concurrent calls to the Read method. func JoinMessages(c *Conn, term string) io.Reader { … } type joinReader … func (r *joinReader) Read(p []byte) (int, error) { … }