Clear line with ANSI escape on update

This commit is contained in:
Alexander Neumann 2014-11-23 14:34:18 +01:00
parent f7b5c00fdb
commit 3f0ea78b86
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ func commandBackup(be backend.Server, key *khepri.Key, args []string) error {
go func(ch <-chan khepri.Stats) {
status := func(d time.Duration) {
fmt.Printf("\r[%s] %3.2f%% %s/s %s / %s ETA %s",
fmt.Printf("\x1b[2K\r[%s] %3.2f%% %s/s %s / %s ETA %s",
format_duration(uint64(d/time.Second)),
float64(stats.Bytes)/float64(arch.Stats.Bytes)*100,
format_bytes(bps),