From 179aa1b287e3a6e26cb334c7bef32705ed6b240a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 9 Jan 2024 10:21:58 -0600 Subject: [PATCH] use a repolist Signed-off-by: Jeff Carr --- main.go | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 511d40c..2e37013 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,9 @@ package main import ( + "io/ioutil" + "strings" + "go.wit.com/log" "go.wit.com/gui/gui" @@ -54,8 +57,8 @@ func addRepo(grid *gui.Node, path string) *repo { newRepo.pLabel = grid.NewLabel(path) newRepo.bLabel = grid.NewLabel("") newRepo.lastLabel = grid.NewLabel("") - newRepo.tagsDrop = grid.NewDropdown("tags") newRepo.vLabel = grid.NewLabel("") + newRepo.tagsDrop = grid.NewDropdown("tags") newRepo.masterVersion = grid.NewLabel("") newRepo.develVersion = grid.NewLabel("") @@ -94,7 +97,15 @@ func helloworld() { grid.NewLabel("commit") grid.NewLabel("push to") - addRepo(grid, "go.wit.com/log") + content, _ := ioutil.ReadFile("/home/jcarr/.config/myrepolist") + out := string(content) + out = strings.TrimSpace(out) + lines := strings.Split(out, "\n") + for _, repo := range lines { + log.Warn("repo =", repo) + addRepo(grid, repo) + } + /* addRepo(grid, "go.wit.com/arg") addRepo(grid, "go.wit.com/spew") addRepo(grid, "go.wit.com/shell") @@ -106,6 +117,13 @@ func helloworld() { addRepo(grid, "go.wit.com/gui/gadgets") addRepo(grid, "go.wit.com/gui/digitalocean") addRepo(grid, "go.wit.com/gui/cloudflare") + addRepo(grid, "") + addRepo(grid, "go.wit.com/apps/control-panel-vpn") + addRepo(grid, "go.wit.com/apps/control-panel-dns") + addRepo(grid, "go.wit.com/apps/control-panel-digitalocean") + addRepo(grid, "go.wit.com/apps/control-panel-cloudflare") + addRepo(grid, "go.wit.com/apps/myrepos") + */ box2.NewButton("checkout jcarr (all repos)", func () { for _, r := range allrepos {