mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Fix typos & add more comments
This commit is contained in:
parent
2e9ce3cf52
commit
3617955bc5
16 changed files with 82 additions and 68 deletions
|
|
@ -403,7 +403,7 @@ func (dp *downloadProgress) update(msg string, permanent bool) {
|
|||
pre := fmt.Sprintf("%s%s [", dp.Prefix, msg)
|
||||
post := fmt.Sprintf("]%4d%% %8d/%d", int(percentage), dp.Current, dp.Total)
|
||||
|
||||
// i don't really know why +2 is needed here but without it the Printf below would not print to the line end
|
||||
// I don't really know why +2 is needed here but without it the Printf below would not print to the line end
|
||||
progressWidth := terminalWidth() - len(pre) - len(post) + 2
|
||||
repeatCount := int(percentage / float32(100) * float32(progressWidth))
|
||||
// it can be lower than zero when the terminal is very tiny
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue