summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-11 22:21:25 -0500
committerJeff Carr <[email protected]>2025-09-11 22:21:25 -0500
commitbafdfb766d0a43bbea38ee568be109d7d40d6628 (patch)
treed7e6fb8cc155776343fd6ec8119b807f78144333
parentcdca120140615cbd99f8fd6fe48ac2be6fc406f4 (diff)
-rw-r--r--exit.go4
-rw-r--r--main.go6
2 files changed, 5 insertions, 5 deletions
diff --git a/exit.go b/exit.go
index ed70f58..c35f662 100644
--- a/exit.go
+++ b/exit.go
@@ -8,7 +8,7 @@ import (
)
func okExit(check *gitpb.Repo, msg string) {
- log.Info("exit() go-mod-clean on", check.GetGoPath(), "ok")
+ log.Info("exit() go-mod-clean on", check.Namespace, "ok")
log.DaemonMode(true)
log.Info(msg)
os.Exit(0)
@@ -16,7 +16,7 @@ func okExit(check *gitpb.Repo, msg string) {
func badExit(check *gitpb.Repo, err error) {
log.DaemonMode(true)
- log.Info("go-mod-clean failed: ", err, forge.GetGoSrc())
+ log.Info("go-mod-clean failed: ", err, forge.Config.ReposDir)
if check != nil {
if argv.Strict != nil {
// if in strict mode, remove the go.mod and go.sum
diff --git a/main.go b/main.go
index 703c1a4..5fe981c 100644
--- a/main.go
+++ b/main.go
@@ -84,12 +84,12 @@ func findPwdRepo() *gitpb.Repo {
// attempt to use the working directory
// this is probably what happens most of the time
pwd, _ := os.Getwd()
- if strings.HasPrefix(pwd, forge.GetGoSrc()) {
- gopath := strings.TrimPrefix(pwd, forge.GetGoSrc())
+ if strings.HasPrefix(pwd, forge.Config.ReposDir) {
+ gopath := strings.TrimPrefix(pwd, forge.Config.ReposDir)
gopath = strings.Trim(gopath, "/")
check = forge.FindByGoPath(gopath)
if check != nil {
- log.Info(check.GetGoPath(), "was found ok in forge")
+ log.Info(check.Namespace, "was found ok in forge")
return check
}
}