diff options
| author | Carlos Martín Nieto <[email protected]> | 2013-03-06 23:59:33 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2013-03-06 23:59:33 +0100 |
| commit | 5c09440f4252223e9f0f49e7d67accd2d7455bbe (patch) | |
| tree | 5fcf0114194960456205b7d5f5aab23dfab5c661 /blob.go | |
| parent | 677378bc3434123eb68a543b256479772bca5631 (diff) | |
Add a couple of missing methods around Blob
Diffstat (limited to 'blob.go')
| -rw-r--r-- | blob.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -20,6 +20,10 @@ func (v *Blob) Free() { C.git_object_free(v.ptr) } +func (v *Blob) Size() int64 { + return int64(C.git_blob_rawsize(v.ptr)) +} + func (v *Blob) Contents() []byte { size := C.int(C.git_blob_rawsize(v.ptr)) buffer := unsafe.Pointer(C.git_blob_rawcontent(v.ptr)) |
