feat: add Get and Has to directoryReferenceMap

This commit is contained in:
Derrick Hammer 2024-03-01 22:21:49 -05:00
parent eb4e4a9f37
commit 9a2d7ebd31
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 15 additions and 0 deletions

View File

@ -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
}