diff options
Diffstat (limited to 'findNext.go')
| -rw-r--r-- | findNext.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/findNext.go b/findNext.go index c920fd8..fd35756 100644 --- a/findNext.go +++ b/findNext.go @@ -21,9 +21,7 @@ func checkDeps(repo *gitpb.Repo) error { if repo.GoDeps == nil { return fmt.Errorf("%s has GoDeps == nil", repo.GetGoPath()) } - all := repo.GoDeps.All() - for all.Scan() { - dep := all.Next() + for dep := range repo.GoDeps.IterAll() { // log.Info(repo.GetGoPath(), dep.GoPath, dep.Version) // check if the package in question is waiting for another package to publish @@ -31,9 +29,12 @@ func checkDeps(repo *gitpb.Repo) error { if found == nil { return fmt.Errorf("%s has dep == nil", repo.GetGoPath(), dep.GoPath) } + + // loop through all the repos that need to be published with new go versions all := me.found.SortByFullPath() for all.Scan() { check := all.Next() + if found.GetGoPath() == check.GetGoPath() { // this package is waiting on other packages to publish return fmt.Errorf("%s is waiting on %s", repo.GetGoPath(), found.GetGoPath()) |
