check errors

This commit is contained in:
Darien Raymond
2018-07-29 13:19:03 +02:00
parent 18f3fb5196
commit 47f1399995
3 changed files with 18 additions and 13 deletions

View File

@@ -118,7 +118,7 @@ func (mb *MultiBuffer) ReadFrom(reader io.Reader) (int64, error) {
// Read implements io.Reader.
func (mb *MultiBuffer) Read(b []byte) (int, error) {
if mb.Len() == 0 {
if mb.IsEmpty() {
return 0, io.EOF
}
endIndex := len(*mb)