aboutsummaryrefslogtreecommitdiff
path: root/obj_blob.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2025-11-16 00:00:00 +0000
committerGravatar Runxi Yu2025-11-16 00:00:00 +0000
commitb6d4ab71d42234a4ae2678083d1b7558b8e6519f (patch)
tree993c8a56ee9b2a72237e29cbf41767d4986c2fc5 /obj_blob.go
parenthash: Make fewer helper functions need explicit hash length fields (diff)
signature
Make the API more consistent
Diffstat (limited to 'obj_blob.go')
-rw-r--r--obj_blob.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/obj_blob.go b/obj_blob.go
index 5ae0c40e..556a21fc 100644
--- a/obj_blob.go
+++ b/obj_blob.go
@@ -21,13 +21,13 @@ func parseBlob(id Hash, body []byte) (*Blob, error) {
}
// Serialize renders the full "blob size\\0body" representation.
-func (b *Blob) Serialize() ([]byte, error) {
- header, err := headerForType(ObjBlob, b.Data)
+func (blob *Blob) Serialize() ([]byte, error) {
+ header, err := headerForType(ObjBlob, blob.Data)
if err != nil {
return nil, err
}
- raw := make([]byte, len(header)+len(b.Data))
+ raw := make([]byte, len(header)+len(blob.Data))
copy(raw, header)
- copy(raw[len(header):], b.Data)
+ copy(raw[len(header):], blob.Data)
return raw, nil
}