quasilyte/go-perfguard

Suggest io.CopyBuffer instead of io.Copy when possible

quasilyte opened this issue · 0 comments

If io.Copy is called inside a loop, one tmp buf can be allocated and used with io.CopyBuffer.
Especially if writer doesn't implement WriterTo and reader doesn't implement ReaderFrom.