Skip to content

Commit 754ba2c

Browse files
committed
Format the code with goimports
1 parent 5dfe68e commit 754ba2c

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

client/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ import (
44
"encoding/json"
55
"errors"
66
"fmt"
7-
"github.com/t3rm1n4l/go-mega"
87
"io/ioutil"
98
"log"
109
"os"
1110
"path"
1211
"strings"
1312
"sync"
1413
"time"
14+
15+
"github.com/t3rm1n4l/go-mega"
1516
)
1617

1718
const (

client/utils.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ package megaclient
33
import (
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 = "\rCopying %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

Comments
 (0)