Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

build: fixup code formatting after goimports change

Nick Craig-Woodade252f13b96
diff --git a/backend/cache/cache_internal_test.go b/backend/cache/cache_internal_test.go
index 12461df82..56ceca047 100644
--- a/backend/cache/cache_internal_test.go
+++ b/backend/cache/cache_internal_test.go
@@ -4,29 +4,25 @@ package cache_test
import (
"bytes"
+ "encoding/base64"
+ "encoding/json"
+ goflag "flag"
+ "fmt"
"io"
"io/ioutil"
"log"
"math/rand"
+ "net/http"
"os"
"path"
"path/filepath"
"runtime"
+ "runtime/debug"
"strconv"
"strings"
"testing"
"time"
- "github.com/pkg/errors"
-
- "encoding/base64"
- goflag "flag"
- "fmt"
- "runtime/debug"
-
- "encoding/json"
- "net/http"
-
"github.com/ncw/rclone/backend/cache"
"github.com/ncw/rclone/backend/crypt"
_ "github.com/ncw/rclone/backend/drive"
@@ -40,6 +36,7 @@ import (
"github.com/ncw/rclone/fstest"
"github.com/ncw/rclone/vfs"
"github.com/ncw/rclone/vfs/vfsflags"
+ "github.com/pkg/errors"
"github.com/stretchr/testify/require"
)
diff --git a/backend/cache/cache_upload_test.go b/backend/cache/cache_upload_test.go
index c81a37044..7c63ef33a 100644
--- a/backend/cache/cache_upload_test.go
+++ b/backend/cache/cache_upload_test.go
@@ -3,6 +3,7 @@
package cache_test
import (
+ "fmt"
"math/rand"
"os"
"path"
@@ -10,8 +11,6 @@ import (
"testing"
"time"
- "fmt"
-
"github.com/ncw/rclone/backend/cache"
_ "github.com/ncw/rclone/backend/drive"
"github.com/ncw/rclone/fs"
diff --git a/backend/cache/directory.go b/backend/cache/directory.go
index 863612758..877313d58 100644
--- a/backend/cache/directory.go
+++ b/backend/cache/directory.go
@@ -3,9 +3,8 @@
package cache
import (
- "time"
-
"path"
+ "time"
"github.com/ncw/rclone/fs"
)
diff --git a/backend/cache/handle.go b/backend/cache/handle.go
index eab1b76a2..6c0833eb6 100644
--- a/backend/cache/handle.go
+++ b/backend/cache/handle.go
@@ -5,12 +5,11 @@ package cache
import (
"fmt"
"io"
- "sync"
- "time"
-
"path"
"runtime"
"strings"
+ "sync"
+ "time"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fs/operations"
diff --git a/backend/cache/plex.go b/backend/cache/plex.go
index eed1843ea..c3a2aba6a 100644
--- a/backend/cache/plex.go
+++ b/backend/cache/plex.go
@@ -3,18 +3,16 @@
package cache
import (
+ "bytes"
"crypto/tls"
"encoding/json"
"fmt"
+ "io/ioutil"
"net/http"
"net/url"
"strings"
- "time"
-
"sync"
-
- "bytes"
- "io/ioutil"
+ "time"
"github.com/ncw/rclone/fs"
"github.com/patrickmn/go-cache"
diff --git a/backend/cache/storage_persistent.go b/backend/cache/storage_persistent.go
index 57406bbd7..967908737 100644
--- a/backend/cache/storage_persistent.go
+++ b/backend/cache/storage_persistent.go
@@ -3,20 +3,17 @@
package cache
import (
- "time"
-
"bytes"
"encoding/binary"
"encoding/json"
+ "fmt"
+ "io/ioutil"
"os"
"path"
"strconv"
"strings"
"sync"
-
- "io/ioutil"
-
- "fmt"
+ "time"
bolt "github.com/coreos/bbolt"
"github.com/ncw/rclone/fs"
diff --git a/backend/crypt/cipher.go b/backend/crypt/cipher.go
index ec21a8077..9cf468d89 100644
--- a/backend/crypt/cipher.go
+++ b/backend/crypt/cipher.go
@@ -17,11 +17,9 @@ import (
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fs/accounting"
"github.com/pkg/errors"
-
+ "github.com/rfjakob/eme"
"golang.org/x/crypto/nacl/secretbox"
"golang.org/x/crypto/scrypt"
-
- "github.com/rfjakob/eme"
)
// Constants
diff --git a/cmd/cmd.go b/cmd/cmd.go
index 8bbd1cf95..8e1945334 100644
--- a/cmd/cmd.go
+++ b/cmd/cmd.go
@@ -20,10 +20,6 @@ import (
"sync"
"time"
- "github.com/pkg/errors"
- "github.com/spf13/cobra"
- "github.com/spf13/pflag"
-
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fs/accounting"
"github.com/ncw/rclone/fs/config/configflags"
@@ -36,6 +32,9 @@ import (
"github.com/ncw/rclone/fs/rc"
"github.com/ncw/rclone/fs/rc/rcflags"
"github.com/ncw/rclone/lib/atexit"
+ "github.com/pkg/errors"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
)
// Globals
diff --git a/cmd/deletefile/deletefile.go b/cmd/deletefile/deletefile.go
index f5c5d7946..3e409cef4 100644
--- a/cmd/deletefile/deletefile.go
+++ b/cmd/deletefile/deletefile.go
@@ -3,7 +3,6 @@ package deletefile
import (
"github.com/ncw/rclone/cmd"
"github.com/ncw/rclone/fs/operations"
-
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/lsf/lsf_test.go b/cmd/lsf/lsf_test.go
index f32a4a674..a2e90c4d1 100644
--- a/cmd/lsf/lsf_test.go
+++ b/cmd/lsf/lsf_test.go
@@ -4,13 +4,12 @@ import (
"bytes"
"testing"
+ _ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fs/list"
"github.com/ncw/rclone/fstest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
-
- _ "github.com/ncw/rclone/backend/local"
)
func TestDefaultLsf(t *testing.T) {
diff --git a/cmd/serve/restic/restic.go b/cmd/serve/restic/restic.go
index 68c2ba5a3..05cb5b9c7 100644
--- a/cmd/serve/restic/restic.go
+++ b/cmd/serve/restic/restic.go
@@ -12,7 +12,6 @@ import (
"regexp"
"strconv"
"strings"
-
"time"
"github.com/ncw/rclone/cmd"
diff --git a/cmd/serve/webdav/webdav.go b/cmd/serve/webdav/webdav.go
index 8a42e1a69..9d7cd84d2 100644
--- a/cmd/serve/webdav/webdav.go
+++ b/cmd/serve/webdav/webdav.go
@@ -14,7 +14,6 @@ import (
"github.com/ncw/rclone/vfs/vfsflags"
"github.com/spf13/cobra"
"golang.org/x/net/context" // switch to "context" when we stop supporting go1.8
-
"golang.org/x/net/webdav"
)
diff --git a/cmd/touch/touch_test.go b/cmd/touch/touch_test.go
index 32d051ab3..686e57b98 100644
--- a/cmd/touch/touch_test.go
+++ b/cmd/touch/touch_test.go
@@ -4,11 +4,10 @@ import (
"testing"
"time"
+ _ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest"
"github.com/stretchr/testify/require"
-
- _ "github.com/ncw/rclone/backend/local"
)
var (
diff --git a/cmd/tree/tree_test.go b/cmd/tree/tree_test.go
index 63390927d..ff31aea10 100644
--- a/cmd/tree/tree_test.go
+++ b/cmd/tree/tree_test.go
@@ -5,12 +5,11 @@ import (
"testing"
"github.com/a8m/tree"
+ _ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
-
- _ "github.com/ncw/rclone/backend/local"
)
func TestTree(t *testing.T) {
diff --git a/fs/log/redirect_stderr_unix.go b/fs/log/redirect_stderr_unix.go
index 6f5c32a3f..4e7aa0a64 100644
--- a/fs/log/redirect_stderr_unix.go
+++ b/fs/log/redirect_stderr_unix.go
@@ -9,7 +9,6 @@ import (
"os"
"github.com/ncw/rclone/fs/config"
-
"golang.org/x/sys/unix"
)
diff --git a/fs/rc/rc.go b/fs/rc/rc.go
index cce537fb6..26c34c6f2 100644
--- a/fs/rc/rc.go
+++ b/fs/rc/rc.go
@@ -12,7 +12,6 @@ import (
"io"
"net/http"
_ "net/http/pprof" // install the pprof http handlers
-
"strings"
"github.com/ncw/rclone/cmd/serve/httplib"
diff --git a/rclone.go b/rclone.go
index 955f89169..dbbf59236 100644
--- a/rclone.go
+++ b/rclone.go
@@ -4,10 +4,9 @@
package main
import (
- "github.com/ncw/rclone/cmd"
-
_ "github.com/ncw/rclone/backend/all" // import all backends
- _ "github.com/ncw/rclone/cmd/all" // import all commands
+ "github.com/ncw/rclone/cmd"
+ _ "github.com/ncw/rclone/cmd/all" // import all commands
)
func main() {