feat: add Get and Has to directoryReferenceMap
This commit is contained in:
parent
eb4e4a9f37
commit
9a2d7ebd31
|
@ -21,6 +21,21 @@ func (drm directoryReferenceMap) Items() map[string]*DirectoryReference {
|
|||
return files
|
||||
}
|
||||
|
||||
func (drm directoryReferenceMap) Get(key string) *DirectoryReference {
|
||||
ret, found := drm.Map.Get(key)
|
||||
|
||||
if !found {
|
||||
return nil
|
||||
}
|
||||
|
||||
return ret.(*DirectoryReference)
|
||||
}
|
||||
|
||||
func (drm directoryReferenceMap) Has(key string) bool {
|
||||
_, found := drm.Map.Get(key)
|
||||
return found
|
||||
}
|
||||
|
||||
type fileReferenceMap struct {
|
||||
linkedhashmap.Map
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue