239331c1ae
A fairly minor change, but this saves two allocations every time points are written to the API (one allocation for the embedded io.LimitReader, and one allocation to create the `close` closure). Also fix the code so that it actually limits to the exact requested number of bytes rather than one more. We don't really need to layer on top of io.LimitReader, as that code is fairly minimal. |
||
---|---|---|
.. | ||
limited_read_closer.go | ||
limited_read_closer_test.go |