Some quick fixes for "correctness"

This commit is contained in:
Caleb Gardner
2021-04-03 01:17:09 -05:00
parent 2a8310a724
commit 7f5fa3ba1f
9 changed files with 41 additions and 36 deletions
+2 -2
View File
@@ -133,7 +133,7 @@ func (br *metadataReader) Read(p []byte) (int, error) {
}
br.readOffset += read
if read != len(p) {
return read, errors.New("Didn't read enough data")
return read, errors.New("didn't read enough data")
}
return read, nil
}
@@ -181,7 +181,7 @@ func (br *metadataReader) Seek(offset int64, whence int) (int64, error) {
br.readOffset = len(br.data) - int(offset)
if br.readOffset < 0 {
br.readOffset = 0
return int64(br.readOffset), errors.New("Trying to seek to a negative value")
return int64(br.readOffset), errors.New("trying to seek to a negative value")
}
}
return int64(br.readOffset), nil