summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-16 04:15:09 -0500
committerJeff Carr <[email protected]>2025-10-16 04:15:09 -0500
commit6f0b5f55014a89db0708c3ee04205dfa4c0554e7 (patch)
treebc58aa8278f4120351f3d2299a9e11c37ebae075
parent86f8529bd0f74be18b61137040ac11404f092268 (diff)
less cruftv0.0.123
-rw-r--r--cleanGoSum.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/cleanGoSum.go b/cleanGoSum.go
index 8909f38..b032d83 100644
--- a/cleanGoSum.go
+++ b/cleanGoSum.go
@@ -27,10 +27,8 @@ func cleanGoDepsCheckOk(check *gitpb.Repo) error {
if check.GoDeps == nil {
return errors.New("check.GoDeps == nil")
}
- all := check.GoDeps.SortByGoPath()
- for all.Scan() {
- depRepo := all.Next()
- found := forge.FindByGoPath(depRepo.GetGoPath())
+ for depRepo := range check.GoDeps.IterAll() {
+ found := forge.FindByNamespace(depRepo.GetGoPath())
if found == nil {
if forge.CheckOverride(depRepo.GetGoPath()) {
// skip this gopath because it's probably broken forever
@@ -41,7 +39,7 @@ func cleanGoDepsCheckOk(check *gitpb.Repo) error {
}
// log.Info("found dep", depRepo.GetGoPath())
if depRepo.GetVersion() != found.GetMasterVersion() {
- check := forge.FindByGoPath(depRepo.GetGoPath())
+ check := forge.FindByNamespace(depRepo.GetGoPath())
var ends string
if check.CheckDirty() {
ends = "(dirty) "
@@ -161,7 +159,7 @@ func trimGoSum(check *gitpb.Repo) error {
if good[gopath] {
fmt.Fprintf(newf, "%s %s\n", gopath, stuff[gopath])
fmt.Fprintf(newf, "%s %s\n", gopath, modver[gopath])
- check := forge.FindByGoPath(gopath)
+ check := forge.FindByNamespace(gopath)
if check == nil {
log.Info("gopath does not really exist:", gopath)
}