*Client: Fix the progressbar, without manipulating other outputs

Prior this commit, 'docker images' and other cmd's, which used utils.HumanSize(),
showed unnecessary whitespaces.
Formatting of progress has been moved to FormatProgess(), justifing the string
directly in the template.
This commit is contained in:
Marcus Farkas
2013-07-12 20:15:25 +02:00
parent a6e5a397bd
commit bac5772312
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ func (r *progressReader) Close() error {
func ProgressReader(r io.ReadCloser, size int, output io.Writer, template []byte, sf *StreamFormatter) *progressReader {
tpl := string(template)
if tpl == "" {
tpl = string(sf.FormatProgress("", "%v/%v (%v)"))
tpl = string(sf.FormatProgress("", "%8v/%v (%v)"))
}
return &progressReader{r, NewWriteFlusher(output), size, 0, 0, tpl, sf}
}