diff options
| author | Jeff Carr <[email protected]> | 2024-12-13 02:22:13 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-13 02:22:13 -0600 |
| commit | 9873bc3d57b89f1e3b142001660a9a4ac2e18810 (patch) | |
| tree | 7af4bc310cdc467582d8061b3ef301a0fd67f359 /goSrcScan.go | |
| parent | 4e94089128d88f6c7778a6e71884d583eb06e1b8 (diff) | |
clean up Init()
Diffstat (limited to 'goSrcScan.go')
| -rw-r--r-- | goSrcScan.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/goSrcScan.go b/goSrcScan.go index 6670259..5599c46 100644 --- a/goSrcScan.go +++ b/goSrcScan.go @@ -51,7 +51,6 @@ func (f *Forge) ScanGoSrc() (bool, error) { func gitDirectoriesNew(srcDir string) ([]string, error) { var all []string var trip bool - reposfile := filepath.Join(srcDir, "repos.pb") err := filepath.WalkDir(srcDir, func(path string, d os.DirEntry, err error) error { if err != nil { // Handle possible errors, like permission issues @@ -62,9 +61,11 @@ func gitDirectoriesNew(srcDir string) ([]string, error) { if d.IsDir() { // log.Info("path is dir", path) } else { - if path == reposfile { - // ignore repos.pb // todo: also ignore go.work // add config option to not warn about this - } else { + _, fname := filepath.Split(path) + switch fname { + case "repos.pb": + case "go.work": + default: // todo: figure out a way to do padding for init() log.Info("WARNING: you have an untracked file outside of any .git repository:", path) trip = true |
