Write is implementation of io.Writer to support updating of progress bar
(s []byte)
| 110 | |
| 111 | // Write is implementation of io.Writer to support updating of progress bar |
| 112 | func (p *Progress) Write(s []byte) (int, error) { |
| 113 | if p.bar != nil { |
| 114 | p.bar.Add(len(s)) |
| 115 | } |
| 116 | return len(s), nil |
| 117 | } |
| 118 | |
| 119 | // AddBar increments progress for progress bar |
| 120 | func (p *Progress) AddBar(count int) { |