From ee7e8d5b2ba38bcc53b210c9a04ccff0de4a4f19 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 17 Dec 2024 06:37:00 -0600 Subject: lots of changes in gitpb --- goSrcScan.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'goSrcScan.go') diff --git a/goSrcScan.go b/goSrcScan.go index 67e6c32..fe65a37 100644 --- a/goSrcScan.go +++ b/goSrcScan.go @@ -24,7 +24,7 @@ func (f *Forge) ScanGoSrc() (bool, error) { if strings.HasPrefix(dir, f.goSrc) { gopath := strings.TrimPrefix(dir, f.goSrc) gopath = strings.Trim(gopath, "/") - if r := f.Repos.FindByGoPath(gopath); r != nil { + if r := f.FindByGoPath(gopath); r != nil { // log.Info("already have", gopath) continue } @@ -144,7 +144,7 @@ func (f *Forge) rillScanDirs(gopaths []string) (int, error) { // Read users from the API. // Concurrency = 20 dirs := rill.Map(ids, 20, func(id string) (*gitpb.Repo, error) { - return f.NewGoRepo(id, "") + return f.checkpath(id, "") }) var counter int @@ -158,13 +158,23 @@ func (f *Forge) rillScanDirs(gopaths []string) (int, error) { return counter, err } +func (f *Forge) checkpath(gopath string, url string) (*gitpb.Repo, error) { + fullpath := filepath.Join(f.GetGoSrc(), gopath) + log.Info("checkpath()", gopath, fullpath) + repo, err := f.NewGoRepo(gopath, "") + if err != nil { + log.Info("checkpath()", gopath, err) + } + return repo, err +} + func (f *Forge) RillRedoGoMod() int { var all []*gitpb.Repo - tmp := f.Repos.SortByGoPath() + tmp := f.Repos.SortByFullPath() for tmp.Scan() { repo := tmp.Next() if !repo.IsValidDir() { - log.Printf("%10s %-50s", "old?", repo.GetGoPath()) + log.Printf("%10s %-50s", "why am I in RillRedoGoMod? old?", repo.GetGoPath()) continue } all = append(all, repo) -- cgit v1.2.3