(s string)
| 112 | } |
| 113 | |
| 114 | func (p *progressBarImpl) write(s string) error { |
| 115 | p.erase(p.writtenLen) |
| 116 | p.writtenLen = utf8.RuneCountInString(s) |
| 117 | _, err := p.writer.Write([]byte(s)) |
| 118 | return err |
| 119 | } |
| 120 | |
| 121 | func (p *progressBarImpl) erase(n int) { |
| 122 | for i := 0; i < n; i++ { |