NewStorage returns a new Storage base on memory
()
| 29 | |
| 30 | // NewStorage returns a new Storage base on memory |
| 31 | func NewStorage() *Storage { |
| 32 | return &Storage{ |
| 33 | ReferenceStorage: make(ReferenceStorage), |
| 34 | ConfigStorage: ConfigStorage{}, |
| 35 | ShallowStorage: ShallowStorage{}, |
| 36 | ObjectStorage: ObjectStorage{ |
| 37 | Objects: make(map[plumbing.Hash]plumbing.EncodedObject), |
| 38 | Commits: make(map[plumbing.Hash]plumbing.EncodedObject), |
| 39 | Trees: make(map[plumbing.Hash]plumbing.EncodedObject), |
| 40 | Blobs: make(map[plumbing.Hash]plumbing.EncodedObject), |
| 41 | Tags: make(map[plumbing.Hash]plumbing.EncodedObject), |
| 42 | }, |
| 43 | ModuleStorage: make(ModuleStorage), |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | type ConfigStorage struct { |
| 48 | config *config.Config |
no outgoing calls
searching dependent graphs…