use a repolist

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-09 10:21:58 -06:00
parent 0d01d82766
commit 179aa1b287
1 changed files with 20 additions and 2 deletions

22
main.go
View File

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