From a048e33f587a8883f8a4f71d27c5dedb6b0afc6c Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 7 Mar 2024 19:31:12 -0600 Subject: working on go-clone --- scan.go | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'scan.go') diff --git a/scan.go b/scan.go index f4b0921..62033d5 100644 --- a/scan.go +++ b/scan.go @@ -2,12 +2,9 @@ package repolist import ( "fmt" - "os" - "path/filepath" "strconv" "strings" - "go.wit.com/lib/gui/repostatus" "go.wit.com/log" ) @@ -73,26 +70,3 @@ func (r *RepoRow) NewScan() int { 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 -} -- cgit v1.2.3