aboutsummaryrefslogtreecommitdiff
path: root/object/parse.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-06-06 21:05:18 +0000
committerGravatar Runxi Yu2026-06-06 21:05:18 +0000
commitd0f52a812c32bd8227179322947e880a9a966a11 (patch)
treef483edb05d78109c9792252bd0bbbc1bee5769d2 /object/parse.go
parentobject/store: Go does not accept \0 (diff)
Various fixes and QoL things
Diffstat (limited to 'object/parse.go')
-rw-r--r--object/parse.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/object/parse.go b/object/parse.go
index cbea09ef..9a7b9068 100644
--- a/object/parse.go
+++ b/object/parse.go
@@ -15,7 +15,7 @@ import (
// and the size of the object.
type SizeMismatchError struct {
Expected uint64
- Got int
+ Got uint64
}
func (sizeMismatchError SizeMismatchError) Error() string {
@@ -37,7 +37,7 @@ func ParseWithHeader(raw []byte, objectFormat id.ObjectFormat) (Object, error) {
body := raw[headerLen:]
if uint64(len(body)) != size {
- return nil, SizeMismatchError{Expected: size, Got: len(body)}
+ return nil, SizeMismatchError{Expected: size, Got: uint64(len(body))}
}
return ParseWithoutHeader(ty, body, objectFormat)