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 {
|
type directoryReferenceMap struct {
|
||||||
linkedhashmap.Map
|
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 {
|
type fileReferenceMap struct {
|
||||||
linkedhashmap.Map
|
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 {
|
type fileReferenceSerializationMap struct {
|
||||||
linkedhashmap.Map
|
linkedhashmap.Map
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue