(text string, percent float64, info string)
| 61 | } |
| 62 | |
| 63 | func (b *ProgressBar) renderTick(text string, percent float64, info string) int { |
| 64 | bar := b.createBar(percent) |
| 65 | output := fmt.Sprintf("%s |%s|%s", |
| 66 | text, |
| 67 | bar, |
| 68 | info) |
| 69 | b.logger.LogError(output) |
| 70 | return utf8.RuneCountInString(output) |
| 71 | } |
| 72 | |
| 73 | func (b *ProgressBar) renderProgress(text string, currentBytes int64, totalBytes int64, bytesPerSecond int64) int { |
| 74 | percent := math.Min(float64(currentBytes)/float64(totalBytes)*100.0, 100.0) |
no test coverage detected