v0.5.0: manifests, filters, logging, docs
This commit is contained in:
@@ -14,7 +14,6 @@ type progressBar struct {
|
||||
width int
|
||||
termH int
|
||||
start time.Time
|
||||
errors []string
|
||||
workers int
|
||||
footerLines int
|
||||
scrollSet bool
|
||||
@@ -94,12 +93,6 @@ func (p *progressBar) updateWorkerProgress(i int, progress float64, bytesDone, b
|
||||
}
|
||||
}
|
||||
|
||||
func (p *progressBar) addError(filename string, err error) {
|
||||
p.mu.Lock()
|
||||
defer p.mu.Unlock()
|
||||
p.errors = append(p.errors, fmt.Sprintf(" \u274c %s: %v", filename, err))
|
||||
}
|
||||
|
||||
func (p *progressBar) logCompleted(line string) {
|
||||
p.mu.Lock()
|
||||
defer p.mu.Unlock()
|
||||
@@ -168,13 +161,6 @@ func (p *progressBar) clear() {
|
||||
p.scrollSet = false
|
||||
}
|
||||
|
||||
func (p *progressBar) flushErrors() {
|
||||
for _, e := range p.errors {
|
||||
fmt.Fprintln(p.w, e)
|
||||
}
|
||||
p.errors = nil
|
||||
}
|
||||
|
||||
func renderWorkerLine(ws workerSlot, width int) string {
|
||||
if width <= 0 {
|
||||
width = 80
|
||||
@@ -300,9 +286,6 @@ func renderBar(pct, barWidth int) string {
|
||||
if fullBlocks < barWidth {
|
||||
fracs := []string{"", "\u258f", "\u258e", "\u258d", "\u258c", "\u258b", "\u258a", "\u2589"}
|
||||
idx := int(partial * 8)
|
||||
if idx > 7 {
|
||||
idx = 7
|
||||
}
|
||||
if idx > 0 {
|
||||
sb.WriteString(fracs[idx])
|
||||
fullBlocks++
|
||||
@@ -347,7 +330,6 @@ func truncateOrPad(s string, width int) string {
|
||||
return string(runes[:i]) + "..."
|
||||
}
|
||||
}
|
||||
return s
|
||||
}
|
||||
return s + strings.Repeat(" ", width-rw)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user