You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wanted to 'extend' the buffio.Reader so that it has a limited reader underneath plus add a setLimit() method to adjust the limit. (Didn't want to allocate a new limitedreader each time)
wanted to 'extend' the limited reader so that the limit could be adjusted. The other problem was that limit reader returned io.EOF when limit reached, but needed a more specific error
Thanks for your review btw! After having a second look at it, it looks like the err handling should have been placed inside the limited reader, then there is no need for readLimitedString() - can just use good old bufio.readString()
There seems to be a lot of buffering structs added. Why are they being used? Was the go defaults for reading from an io.Reader unsafe?
Are you trying to limit the amount read? You could use an
io.LimitReader()
:The text was updated successfully, but these errors were encountered: