From 1f64d789038594098ea2c9cf796391f101d0bea5 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Thu, 11 Aug 2016 18:07:29 +0200 Subject: core: new MemoryObject, move from memory.Object, packfile.Parser, base on new ObjectStorage interface --- storage/memory/storage.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'storage/memory/storage.go') diff --git a/storage/memory/storage.go b/storage/memory/storage.go index 62fd1b4..c827ce0 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -28,6 +28,11 @@ func NewObjectStorage() *ObjectStorage { } } +// NewObject creates a new MemoryObject +func (o *ObjectStorage) NewObject() core.Object { + return &core.MemoryObject{} +} + // Set stores an object, the object should be properly filled before set it. func (o *ObjectStorage) Set(obj core.Object) (core.Hash, error) { h := obj.Hash() -- cgit