From bafdfb766d0a43bbea38ee568be109d7d40d6628 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 11 Sep 2025 22:21:25 -0500 Subject: [PATCH] rm GoSrc() --- exit.go | 4 ++-- main.go | 6 +++--- 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 } }