diff --git a/main.go b/main.go index 2e37013..91e896e 100644 --- a/main.go +++ b/main.go @@ -97,34 +97,11 @@ func helloworld() { grid.NewLabel("commit") grid.NewLabel("push to") - content, _ := ioutil.ReadFile("/home/jcarr/.config/myrepolist") - out := string(content) - out = strings.TrimSpace(out) - lines := strings.Split(out, "\n") - for _, repo := range lines { + repos := myrepolist() + for _, repo := range repos { 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") - addRepo(grid, "") - addRepo(grid, "go.wit.com/gui/gui") - addRepo(grid, "go.wit.com/gui/widget") - addRepo(grid, "go.wit.com/gui/toolkits") - addRepo(grid, "go.wit.com/gui/debugger") - 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 { r.checkoutBranch("jcarr") @@ -166,3 +143,11 @@ func smartDraw(sw *smartwindow.SmartWindow) { log.Println("smart") }) } + +func myrepolist() []string { + content, _ := ioutil.ReadFile("/home/jcarr/.config/myrepolist") + out := string(content) + out = strings.TrimSpace(out) + lines := strings.Split(out, "\n") + return lines +}