summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-14 15:18:39 -0600
committerJeff Carr <[email protected]>2024-02-14 15:18:39 -0600
commite6eb92845ace066aa36c8730d28c3e53fe6bdca8 (patch)
tree54b07516135b6731602a34dc76cb28cca3fcbd99
parent3d6002b0553c1ec8f3dcfae35ef053c7cc01413a (diff)
add a lookup by path functionv0.20.7v0.20.6
-rw-r--r--new.go11
1 files changed, 10 insertions, 1 deletions
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)