diff options
-rw-r--r-- | plumbing/object/blob.go | 3 | ||||
-rw-r--r-- | plumbing/object/object.go | 7 |
2 files changed, 7 insertions, 3 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 { diff --git a/plumbing/object/object.go b/plumbing/object/object.go index 51d9bc4..5512932 100644 --- a/plumbing/object/object.go +++ b/plumbing/object/object.go @@ -1,3 +1,5 @@ +// Package object contains implementations of all Git objects and utility +// functions to work with them. package object import ( @@ -35,8 +37,9 @@ var ErrUnsupportedObject = errors.New("unsupported object type") // } // } // -// This interface is intentionally different from plumbing.EncodedObject, which is a lower -// level interface used by storage implementations to read and write objects. +// This interface is intentionally different from plumbing.EncodedObject, which +// is a lower level interface used by storage implementations to read and write +// objects in its encoded form. type Object interface { ID() plumbing.Hash Type() plumbing.ObjectType |