@@ -3,14 +3,15 @@ package megaclient
33import (
44 "bytes"
55 "fmt"
6- "github.com/t3rm1n4l/go-humanize"
7- "github.com/t3rm1n4l/go-mega"
86 "os"
97 "path/filepath"
108 "runtime"
119 "strings"
1210 "sync"
1311 "time"
12+
13+ "github.com/t3rm1n4l/go-humanize"
14+ "github.com/t3rm1n4l/go-mega"
1415)
1516
1617// Get all the paths by doing DFS traversal
@@ -152,7 +153,7 @@ func progressBar(ch chan int, wg *sync.WaitGroup, size int64, src, dst string) {
152153 var fmtStr string
153154 var isWin = runtime .GOOS == "windows"
154155 if isWin {
155- // windows not support ascii escape code
156+ // windows not support ascii escape code
156157 fmtStr = "\r Copying %s -> %s # %.2f %% of %s at %.4s/s %v "
157158 } else {
158159 fmtStr = "\r \033 [2KCopying %s -> %s # %.2f %% of %s at %.4s/s %v "
@@ -163,7 +164,7 @@ func progressBar(ch chan int, wg *sync.WaitGroup, size int64, src, dst string) {
163164 // so just print space to clear last line.
164165 fmt .Fprintf (os .Stdout , "\r %s" , bytes .Repeat ([]byte {0x20 }, lastLineNum ))
165166 }
166- lastLineNum ,_ = fmt .Fprintf (os .Stdout , fmtStr , src , dst , percent , humanize .Bytes (uint64 (size )), humanize .Bytes (bps ), dur )
167+ lastLineNum , _ = fmt .Fprintf (os .Stdout , fmtStr , src , dst , percent , humanize .Bytes (uint64 (size )), humanize .Bytes (bps ), dur )
167168 }
168169
169170 showProgress ()
0 commit comments