Skip to content

Don't pass in buffer directly to writer

John Cai requested to merge jc/dont-pass-in-buffer-directly-to-writer into master

The io.Writer interface specifies that implementations must not retain p [1]. However, we have many places in the code that pass in the buffer directly to a streamio.Writer. Find places where we do this and make sure we pass in a copy of the data instead.

  1. https://pkg.go.dev/io#Writer

fixes: #6129

Merge request reports

Loading