Closed martinthomson closed 6 years ago
When minq runs out of data, it returns an error (minq.ErrWouldBlock). This makes the API hard to consume in go.
minq.ErrWouldBlock
All native uses of io.Reader block. Many uses don't care much, but if you use io.Copy(), or ioutil.ReadAll() this distinction matters.
io.Reader
io.Copy()
ioutil.ReadAll()
This isn't a big deal. I've worked around this by wrapping minq.Stream.
minq.Stream
I have a wrapper. It's a horrorshow, but it works.
When minq runs out of data, it returns an error (
minq.ErrWouldBlock
). This makes the API hard to consume in go.All native uses of
io.Reader
block. Many uses don't care much, but if you useio.Copy()
, orioutil.ReadAll()
this distinction matters.This isn't a big deal. I've worked around this by wrapping
minq.Stream
.