Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
Chage the for loop style
Browse files Browse the repository at this point in the history
  • Loading branch information
zkry committed Mar 19, 2018
1 parent 7fc577b commit 2935827
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/dep/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,14 @@ func (cmd *statusCommand) runOld(ctx *dep.Ctx, out oldOutputter, p *dep.Project,
solutionProjects := solution.Projects()

for _, proj := range p.Lock.Projects() {
for i := range solutionProjects {
for _, sProj := range solutionProjects {
// Look for the same project in solution and lock.
if solutionProjects[i].Ident().ProjectRoot != proj.Ident().ProjectRoot {
if sProj.Ident().ProjectRoot != proj.Ident().ProjectRoot {
continue
}

// If revisions are not the same then it is old and we should display it.
latestRev, _, _ := gps.VersionComponentStrings(solutionProjects[i].Version())
latestRev, _, _ := gps.VersionComponentStrings(sProj.Version())
atRev, _, _ := gps.VersionComponentStrings(proj.Version())
if atRev == latestRev {
continue
Expand Down

0 comments on commit 2935827

Please sign in to comment.