diff options
| author | Jeff Carr <[email protected]> | 2025-09-13 05:33:11 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-13 05:33:11 -0500 |
| commit | 0f895e83e62749bb1d716033f5f300d9d1c548ac (patch) | |
| tree | f0d29c4b96f998469cefe140006c4e0a20a361aa /goSrcScan.go | |
| parent | ce4af38e8b7f05a6d8b48bc957091de0b0b0a9e7 (diff) | |
use config GO library
Diffstat (limited to 'goSrcScan.go')
| -rw-r--r-- | goSrcScan.go | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/goSrcScan.go b/goSrcScan.go index c55bb6e..4597d0a 100644 --- a/goSrcScan.go +++ b/goSrcScan.go @@ -15,12 +15,36 @@ import ( func reloadCheck(repo *gitpb.Repo) error { if err := repo.ReloadCheck(); err != nil { log.Infof("%s reload() says %v\n", repo.FullPath, err) - // configSave = true return err } return nil } +func (f *Forge) TestScan() error { + f.Repos = gitpb.NewRepos() + dirs, err := gitDirectoriesNew(f.Config.ReposDir) + if err != nil { + return err + } + for i, fullpath := range dirs { + repo, err := gitpb.NewRepo(fullpath) + if err != nil { + log.Info("ReAdd() error", fullpath, err) + } + log.Info(i, "worked", repo.FullPath) + repo = f.Repos.Append(repo) + f.VerifyBranchNames(repo) + if f.Config.IsReadOnly(repo.GetGoPath()) { + repo.ReadOnly = true + } + repo.ReloadCheck() + if i > 5 { + break + } + } + return nil +} + func (f *Forge) ScanGoSrc() (bool, error) { dirs, err := gitDirectoriesNew(f.Config.ReposDir) if err != nil { @@ -220,6 +244,5 @@ func (f *Forge) ReAdd(repo *gitpb.Repo) (*gitpb.Repo, error) { log.Info("ReAdd() error", fullpath, err) return nil, err } - f.configSave = true return repo, err } |
