mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Progress when downloading single files and when parsing remote mirrors.
This commit is contained in:
@@ -101,6 +101,13 @@ func (p *Progress) AddBar(count int) {
|
||||
}
|
||||
}
|
||||
|
||||
// SetBar sets current position for progress bar
|
||||
func (p *Progress) SetBar(count int) {
|
||||
if p.bar != nil {
|
||||
p.bar.Set(count)
|
||||
}
|
||||
}
|
||||
|
||||
// Printf does printf but in safe manner: not overwriting progress bar
|
||||
func (p *Progress) Printf(msg string, a ...interface{}) {
|
||||
p.queue <- printTask{code: codePrint, message: fmt.Sprintf(msg, a...)}
|
||||
|
||||
Reference in New Issue
Block a user