aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/blob.go
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-02-06 18:11:10 +0100
committerSantiago M. Mola <santi@mola.io>2017-02-06 18:11:59 +0100
commit2b1efd219e1f20d9a0bc380a26074c9d8de2ae1f (patch)
tree9c75fd75bd905c2bcf736b0d87e5dde81ad230a4 /plumbing/object/blob.go
parent70eff0d7bd1f69856f8028c2487576085a54a42c (diff)
downloadgo-git-2b1efd219e1f20d9a0bc380a26074c9d8de2ae1f.tar.gz
doc: improve docs for object package.
* add package description. * add godoc to DecodeBlob. * clarify godoc for Object and Blob.
Diffstat (limited to 'plumbing/object/blob.go')
-rw-r--r--plumbing/object/blob.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/plumbing/object/blob.go b/plumbing/object/blob.go
index f274e70..76b0e7d 100644
--- a/plumbing/object/blob.go
+++ b/plumbing/object/blob.go
@@ -8,7 +8,7 @@ import (
"srcd.works/go-git.v4/utils/ioutil"
)
-// Blob is used to store file data - it is generally a file.
+// Blob is used to store arbitrary data - it is generally a file.
type Blob struct {
Hash plumbing.Hash
Size int64
@@ -26,6 +26,7 @@ func GetBlob(s storer.EncodedObjectStorer, h plumbing.Hash) (*Blob, error) {
return DecodeBlob(o)
}
+// DecodeObject decodes an encoded object into a *Blob.
func DecodeBlob(o plumbing.EncodedObject) (*Blob, error) {
b := &Blob{}
if err := b.Decode(o); err != nil {