News for hackers. Stuff that matters.
Re:Too Much Go Misdirection by 0points on Tuesday May 20, 2025 @04:28AM (#44039162)
When you are working with streaming data, you really should be passing around io.Readers if you want any sort of performance out of it.

A []byte require you to read ALL data in advance.

And if you still end up with []byte and need to use a interface taking io.Reader, then you wrap []byte in a bytes.Buffer which implements io.Reader.

There are no comments on this comment yet.