In the Go programming language, is bytes.Buffer thread-safe? AFAIK, its documentation does not mention thread safety.
bytes.Buffer
Use io.Pipe() function call which provide pair of connected objects (*PipeReader, *PipeWriter) for synchronous read/write. This could be done in parallel, and it's a thread-safe.
io.Pipe()
*PipeReader
*PipeWriter