add a lookup by path function

This commit is contained in:
Jeff Carr 2024-02-14 15:18:39 -06:00
parent 3d6002b055
commit e6eb92845a
1 changed files with 10 additions and 1 deletions

9
new.go
View File

@ -17,6 +17,15 @@ func ListAll() {
}
}
// returns the object for the path
func FindPath(path string) *RepoStatus {
if windowMap[path] == nil {
log.Log(INFO, "FindPath() not initialized yet", path)
return nil
}
return windowMap[path]
}
func NewRepoStatusWindow(path string) *RepoStatus {
if windowMap[path] == nil {
log.Log(INFO, "NewRepoStatusWindow() adding new", path)