aboutsummaryrefslogtreecommitdiffstats
path: root/storage/memory/storage.go
diff options
context:
space:
mode:
Diffstat (limited to 'storage/memory/storage.go')
-rw-r--r--storage/memory/storage.go5
1 files changed, 5 insertions, 0 deletions
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()