diff options
Diffstat (limited to 'storage/memory/storage.go')
-rw-r--r-- | storage/memory/storage.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/storage/memory/storage.go b/storage/memory/storage.go index c9306ee..927ec41 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -30,17 +30,17 @@ type Storage struct { // NewStorage returns a new Storage base on memory func NewStorage() *Storage { return &Storage{ - ReferenceStorage: make(ReferenceStorage, 0), + ReferenceStorage: make(ReferenceStorage), ConfigStorage: ConfigStorage{}, ShallowStorage: ShallowStorage{}, ObjectStorage: ObjectStorage{ - Objects: make(map[plumbing.Hash]plumbing.EncodedObject, 0), - Commits: make(map[plumbing.Hash]plumbing.EncodedObject, 0), - Trees: make(map[plumbing.Hash]plumbing.EncodedObject, 0), - Blobs: make(map[plumbing.Hash]plumbing.EncodedObject, 0), - Tags: make(map[plumbing.Hash]plumbing.EncodedObject, 0), + Objects: make(map[plumbing.Hash]plumbing.EncodedObject), + Commits: make(map[plumbing.Hash]plumbing.EncodedObject), + Trees: make(map[plumbing.Hash]plumbing.EncodedObject), + Blobs: make(map[plumbing.Hash]plumbing.EncodedObject), + Tags: make(map[plumbing.Hash]plumbing.EncodedObject), }, - ModuleStorage: make(ModuleStorage, 0), + ModuleStorage: make(ModuleStorage), } } @@ -152,7 +152,7 @@ func flattenObjectMap(m map[plumbing.Hash]plumbing.EncodedObject) []plumbing.Enc func (o *ObjectStorage) Begin() storer.Transaction { return &TxObjectStorage{ Storage: o, - Objects: make(map[plumbing.Hash]plumbing.EncodedObject, 0), + Objects: make(map[plumbing.Hash]plumbing.EncodedObject), } } @@ -189,7 +189,7 @@ func (tx *TxObjectStorage) Commit() error { } func (tx *TxObjectStorage) Rollback() error { - tx.Objects = make(map[plumbing.Hash]plumbing.EncodedObject, 0) + tx.Objects = make(map[plumbing.Hash]plumbing.EncodedObject) return nil } |