save name of the cfgfile
This commit is contained in:
parent
e3202ae1e9
commit
de662f3b18
|
@ -7,8 +7,8 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"go.wit.com/log"
|
|
||||||
"go.wit.com/lib/gui/repostatus"
|
"go.wit.com/lib/gui/repostatus"
|
||||||
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (v *RepoList) InitRepoList(cfgfile string) {
|
func (v *RepoList) InitRepoList(cfgfile string) {
|
||||||
|
|
24
newRepo.go
24
newRepo.go
|
@ -192,17 +192,17 @@ func (r *RepoList) makeGuireleaserView(newRepo *RepoRow) {
|
||||||
newRepo.Hide()
|
newRepo.Hide()
|
||||||
})
|
})
|
||||||
/*
|
/*
|
||||||
newRepo.endBox.NewButton("CheckValidGoSum()", func() {
|
newRepo.endBox.NewButton("CheckValidGoSum()", func() {
|
||||||
ok, err := r.CheckValidGoSum(newRepo)
|
ok, err := r.CheckValidGoSum(newRepo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Info("go mod tidy did not work err =", err)
|
log.Info("go mod tidy did not work err =", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ok {
|
if ok {
|
||||||
log.Info("repo has go.sum requirements that are clean")
|
log.Info("repo has go.sum requirements that are clean")
|
||||||
// newRepo.goState.SetText("GOOD")
|
// newRepo.goState.SetText("GOOD")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
26
scan.go
26
scan.go
|
@ -2,10 +2,13 @@ package repolist
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
|
"go.wit.com/lib/gui/repostatus"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (r *RepoList) RegisterHideFunction(f func(*RepoRow)) {
|
func (r *RepoList) RegisterHideFunction(f func(*RepoRow)) {
|
||||||
|
@ -70,3 +73,26 @@ func (r *RepoRow) NewScan() int {
|
||||||
|
|
||||||
return changed
|
return changed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ScanGitDirectories(srcDir string) []string {
|
||||||
|
var all []string
|
||||||
|
err := filepath.Walk(srcDir, func(path string, info os.FileInfo, err error) error {
|
||||||
|
if err != nil {
|
||||||
|
log.Log(REPOWARN, "Error accessing path:", path, err)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the path is a directory and has a .git subdirectory
|
||||||
|
if info.IsDir() && repostatus.IsGitDir(path) {
|
||||||
|
all = append(all, path)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
log.Log(REPOWARN, "Error walking the path:", srcDir, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return all
|
||||||
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ type RepoList struct {
|
||||||
goSrcPwd string
|
goSrcPwd string
|
||||||
allrepos map[string]*RepoRow
|
allrepos map[string]*RepoRow
|
||||||
viewName string
|
viewName string
|
||||||
cfgfile string
|
cfgfile string
|
||||||
|
|
||||||
reposbox *gui.Node
|
reposbox *gui.Node
|
||||||
reposgrid *gui.Node
|
reposgrid *gui.Node
|
||||||
|
|
Loading…
Reference in New Issue