start using IterBy()
This commit is contained in:
parent
96aa1f09ea
commit
4b2ac683b7
2
Makefile
2
Makefile
|
@ -38,7 +38,7 @@ andlabs: clean install
|
|||
forge --gui andlabs
|
||||
|
||||
gocui: install
|
||||
forge --gui gocui --gui-verbose >/tmp/forge.log 2>&1
|
||||
forge --gui gocui --gui-verbose --gui-file ../../toolkits/gocui/gocui.so >/tmp/forge.log 2>&1
|
||||
# forge --gui gocui --gui-verbose --debugger
|
||||
|
||||
goimports:
|
||||
|
|
|
@ -160,7 +160,7 @@ func doRegister(newurl string) error {
|
|||
}
|
||||
|
||||
test := strings.TrimSpace(string(body))
|
||||
for _, line := range strings.Split(test, "\n") {
|
||||
for line := range strings.SplitSeq(test, "\n") {
|
||||
line = strings.TrimSpace(line)
|
||||
log.Info("server returned:", line)
|
||||
}
|
||||
|
|
|
@ -25,9 +25,7 @@ func makeReposWin() *gadgets.GenericWindow {
|
|||
tb, box := makeStandardReposWindow("dirty repos", found)
|
||||
hbox := box.Box().Horizontal()
|
||||
hbox.NewButton("commit all", func() {
|
||||
all := found.SortByFullPath()
|
||||
for all.Scan() {
|
||||
repo := all.Next()
|
||||
for repo := range found.IterByFullPath() {
|
||||
log.Info("do commit here on", repo.GetGoPath())
|
||||
}
|
||||
log.Info("TODO: fix this")
|
||||
|
@ -55,9 +53,7 @@ func makeReposWin() *gadgets.GenericWindow {
|
|||
|
||||
// make the window for the first time
|
||||
found := new(gitpb.Repos)
|
||||
all := me.forge.Repos.SortByFullPath()
|
||||
for all.Scan() {
|
||||
repo := all.Next()
|
||||
for repo := range me.forge.Repos.IterByFullPath() {
|
||||
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
|
||||
continue
|
||||
}
|
||||
|
@ -367,9 +363,11 @@ func makeWritableWindow(pb *gitpb.Repos) (*gadgets.GenericWindow, *gitpb.ReposTa
|
|||
log.Info("todo: run git pull on each repo")
|
||||
})
|
||||
|
||||
grid.NewButton("do repos.ReScan()", func() {
|
||||
t.Update()
|
||||
})
|
||||
/*
|
||||
grid.NewButton("do repos.ReScan()", func() {
|
||||
t.Update()
|
||||
})
|
||||
*/
|
||||
|
||||
tbox := win.Bottom.Box()
|
||||
t.SetParent(tbox)
|
||||
|
|
Loading…
Reference in New Issue