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

status: adding counts to verbose output #1037

Merged
merged 1 commit into from
Aug 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cmd/dep/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ func runStatusAll(ctx *dep.Ctx, out outputter, p *dep.Project, sm gps.SourceMana

logger.Println("Checking upstream projects:")

for _, proj := range slp {
logger.Println(proj.Ident().ProjectRoot)
for i, proj := range slp {
logger.Printf("(%d/%d) %s\n", i+1, len(slp), proj.Ident().ProjectRoot)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does go lift the len computation out of the loop?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but there is not really any "computation" going on. Slice lengths are stored in the slice internal struct representation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice! 👍 Thanks for the explanation.


bs := BasicStatus{
ProjectRoot: string(proj.Ident().ProjectRoot),
Expand Down Expand Up @@ -427,6 +427,7 @@ func runStatusAll(ctx *dep.Ctx, out outputter, p *dep.Project, sm gps.SourceMana

out.BasicLine(&bs)
}
logger.Println()
out.BasicFooter()

return digestMismatch, hasMissingPkgs, nil
Expand Down