(buf []byte)
| 79 | } |
| 80 | |
| 81 | func (p *progress) Write(buf []byte) (int, error) { |
| 82 | l := len(buf) |
| 83 | p.current += int64(l) |
| 84 | p.ShowProgress() |
| 85 | return l, nil |
| 86 | } |
| 87 | |
| 88 | // Writes the current download progress to stdout. |
| 89 | func (p *progress) ShowProgress() { |