summaryrefslogtreecommitdiff
path: root/goSrcScan.go
diff options
context:
space:
mode:
Diffstat (limited to 'goSrcScan.go')
-rw-r--r--goSrcScan.go18
1 files changed, 14 insertions, 4 deletions
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)