diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-12 12:49:46 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-12 12:49:46 +0200 |
commit | e1f7b169aaa99d07fe8ad8e71a0cba2322e7d35f (patch) | |
tree | 50f195024fa492120db0c9822111cc84b0c659ce /core/memory.go | |
parent | 8948d4b48acfc39462f0c75525bc6b53c1ac59b2 (diff) | |
download | go-git-e1f7b169aaa99d07fe8ad8e71a0cba2322e7d35f.tar.gz |
small improvements
Diffstat (limited to 'core/memory.go')
-rw-r--r-- | core/memory.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/core/memory.go b/core/memory.go index 6477f74..e3063d6 100644 --- a/core/memory.go +++ b/core/memory.go @@ -13,11 +13,6 @@ type MemoryObject struct { sz int64 } -// NewMemoryObject creates a new MemoryObject -func NewMemoryObject(t ObjectType, len int64, cont []byte) *MemoryObject { - return &MemoryObject{t: t, sz: len, cont: cont} -} - // Hash return the object Hash, the hash is calculated on-the-fly the first // time is called, the subsequent calls the same Hash is returned even if the // type or the content has changed. The Hash is only generated if the size of @@ -39,7 +34,8 @@ func (o *MemoryObject) SetType(t ObjectType) { o.t = t } // Size return the size of the object func (o *MemoryObject) Size() int64 { return o.sz } -// SetSize set the object size, the given size should be written afterwards +// SetSize set the object size, a content of the given size should be written +// afterwards func (o *MemoryObject) SetSize(s int64) { o.sz = s } // Content returns the contents of the object |