diff --git a/new.go b/new.go index 337329e..f7f4b86 100644 --- a/new.go +++ b/new.go @@ -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) @@ -45,7 +54,7 @@ func NewRepoStatusWindow(path string) *RepoStatus { } rs := &RepoStatus{ - ready: false, + ready: false, } rs.tags = make(map[string]string) rs.window = gadgets.RawBasicWindow("GO Repo Details " + path)