aboutsummaryrefslogtreecommitdiff
path: root/object/header/append.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-06-13 03:32:21 +0000
committerGravatar Runxi Yu2026-06-13 04:59:51 +0000
commitbe63ecd9711b46135bbff1769c2e4c3642255ef1 (patch)
treed5581c8b2e438af2b8ae82dd8f200393b2dbc5d3 /object/header/append.go
parentTODO: Update (diff)
Unify lengths
Diffstat (limited to 'object/header/append.go')
-rw-r--r--object/header/append.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/object/header/append.go b/object/header/append.go
index b204002d..b8d6669d 100644
--- a/object/header/append.go
+++ b/object/header/append.go
@@ -8,13 +8,13 @@ import (
)
// Append appends a canonical loose-object header ("type size\x00") to dst.
-func Append(dst []byte, ty typ.Type, size uint64) []byte {
+func Append(dst []byte, ty typ.Type, size int) []byte {
tyName := ty.Name()
dst = slices.Grow(dst, len(tyName)+1+19+1)
dst = append(dst, tyName...)
dst = append(dst, ' ')
- dst = strconv.AppendUint(dst, size, 10)
+ dst = strconv.AppendInt(dst, int64(size), 10)
dst = append(dst, 0)
return dst