summaryrefslogtreecommitdiff
path: root/scanRepoDir.go
diff options
context:
space:
mode:
Diffstat (limited to 'scanRepoDir.go')
-rw-r--r--scanRepoDir.go17
1 files changed, 15 insertions, 2 deletions
diff --git a/scanRepoDir.go b/scanRepoDir.go
index 81149aa..e09af30 100644
--- a/scanRepoDir.go
+++ b/scanRepoDir.go
@@ -37,8 +37,21 @@ func (f *Forge) checkNamespace(fullpath string) (*gitpb.Repo, error) {
return repo, err
}
-func (f *Forge) ScanRepoDir() error {
- dirs, err := gitDirectoriesNew(config.Get("ReposDir"))
+func (f *Forge) RescanRepos() error {
+ log.Info("RescanRepos() running")
+ gopath := config.Get("gopath")
+ f.ScanRepoDir(gopath)
+ // f.SaveRepos()
+ f.Repos.SaveVerbose()
+ return errors.New("ScanReposByMode() not implemented yet")
+}
+
+// scans for .git/ directories
+func (f *Forge) ScanRepoDir(path string) error {
+ if path == "" {
+ return errors.New("ScanRepoDir() got sent blank dir")
+ }
+ dirs, err := gitDirectoriesNew(path)
if err != nil {
return err
}