-
Notifications
You must be signed in to change notification settings - Fork 1k
status: adding counts to verbose output #1037
Conversation
I like the idea of using this If others are on board, it could be added to some other existing output, like:
Or:
Edit: Dry run output ( Related #1038 |
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this do / why do we need it?
Small tweak to verbose status output adding counts so that progress can be roughly monitored.
Before:
After:
Which issue(s) does this PR fix?
Follow up from #1009, related to #1008