diff options
| author | Jeff Carr <[email protected]> | 2024-12-17 06:37:14 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-17 06:37:14 -0600 |
| commit | 233f7bca767aab9df55adea409e9820050631586 (patch) | |
| tree | 1ce61760e8b31077b9accc9b1da978d935a132d3 /reloadIsTracked.go | |
| parent | 4bc95ad2684cb42159229b8198aa8a2377f80aa1 (diff) | |
lots of changes to isolate exec 'git'
Diffstat (limited to 'reloadIsTracked.go')
| -rw-r--r-- | reloadIsTracked.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/reloadIsTracked.go b/reloadIsTracked.go index 9e44b2a..bdb6138 100644 --- a/reloadIsTracked.go +++ b/reloadIsTracked.go @@ -40,12 +40,12 @@ func (repo *Repo) RepoIgnoresGoMod() error { repo.GoInfo.GitIgnoresGoSum = false file := "go.mod" if tracked, err := repo.isTracked(file); err != nil { - msg := fmt.Sprintf("%s Error checking if %s tracked: %v\n", repo.GoPath, file, err) + msg := fmt.Sprintf("%s Error checking if %s tracked: %v\n", repo.GetGoPath(), file, err) log.Info("gitpb:", msg) return err } else { if tracked { - msg := fmt.Sprintf("%s %s is tracked by Git.\n", repo.GoPath, file) + msg := fmt.Sprintf("%s %s is tracked by Git.\n", repo.GetGoPath(), file) log.Info("gitpb:", msg) return errors.New(msg) } @@ -53,18 +53,18 @@ func (repo *Repo) RepoIgnoresGoMod() error { if ignored, err := repo.isIgnored(file); err != nil { if err != nil { - msg := fmt.Sprintf("%s Error checking if ignored: %v\n", repo.GoPath, err) + msg := fmt.Sprintf("%s Error checking if ignored: %v\n", repo.GetGoPath(), err) log.Info("gitpb:", msg) return err } } else { if ignored { - fmt.Printf("%s %s is ignored by Git.\n", repo.GoPath, file) + fmt.Printf("%s %s is ignored by Git.\n", repo.GetGoPath(), file) repo.GoInfo.GitIgnoresGoSum = true return nil } } - msg := fmt.Sprintf("%s %s is neither tracked nor ignored by Git.\n", repo.GoPath, file) + msg := fmt.Sprintf("%s %s is neither tracked nor ignored by Git.\n", repo.GetGoPath(), file) // this means, if you make a go.mod file, it'll add it to the repo to be tracked // so you need to either add it to .gitignore (this is what should happen) // or accept you want an auto-generated file to put endless garbage in your git repo |
