refactor: add items methods for directoryReferenceMap and fileReferenceMap
This commit is contained in:
parent
5a0b742139
commit
7bd9cf11ae
|
@ -11,9 +11,29 @@ import (
|
|||
type directoryReferenceMap struct {
|
||||
linkedhashmap.Map
|
||||
}
|
||||
|
||||
func (drm directoryReferenceMap) Items() map[string]*DirectoryReference {
|
||||
files := make(map[string]*DirectoryReference)
|
||||
iter := drm.Iterator()
|
||||
for iter.Next() {
|
||||
files[iter.Key().(string)] = iter.Value().(*DirectoryReference)
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
type fileReferenceMap struct {
|
||||
linkedhashmap.Map
|
||||
}
|
||||
|
||||
func (drm fileReferenceMap) Items() map[string]*FileReference {
|
||||
files := make(map[string]*FileReference)
|
||||
iter := drm.Iterator()
|
||||
for iter.Next() {
|
||||
files[iter.Key().(string)] = iter.Value().(*FileReference)
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
type fileReferenceSerializationMap struct {
|
||||
linkedhashmap.Map
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue