3 ms·
Instead of focusing on bytes.Reader, the author could maybe propose that bytes.Buffer (which already has a Bytes method) implements Peek as well. bytes.Buffer
by ncruces 1y ago
Instead of focusing on bytes.Reader, the author could maybe propose that bytes.Buffer (which already has a Bytes method) implements Peek as well.
bytes.Buffer already has many methods exposing the internal buffer, so one more is not insurmountable.