"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
build: replace the deprecated golint linter with revive
Nick Craig-Wooda98e3ea6f134
diff --git a/.golangci.yml b/.golangci.ymlindex 8b8e9bd73..5bcf73589 100644--- a/.golangci.yml+++ b/.golangci.yml@@ -5,7 +5,7 @@ linters:- deadcode- errcheck- goimports- - golint+ - revive- ineffassign- structcheck- varcheckdiff --git a/backend/compress/compress.go b/backend/compress/compress.goindex f1aa9b32f..e5f9451c6 100644--- a/backend/compress/compress.go+++ b/backend/compress/compress.go@@ -1260,7 +1260,7 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (rc io.Readreturn o.Object.Open(ctx, options...)}// Get offset and limit from OpenOptions, pass the rest to the underlying remote- var openOptions []fs.OpenOption = []fs.OpenOption{&fs.SeekOption{Offset: 0}}+ var openOptions = []fs.OpenOption{&fs.SeekOption{Offset: 0}}var offset, limit int64 = 0, -1for _, option := range options {switch x := option.(type) {diff --git a/backend/tardigrade/object.go b/backend/tardigrade/object.goindex d8369e841..581070d69 100644--- a/backend/tardigrade/object.go+++ b/backend/tardigrade/object.go@@ -132,7 +132,7 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (_ io.ReadC// Convert the semantics of HTTP range headers to an offset and length// that libuplink can use.var (- offset int64 = 0+ offset int64length int64 = -1)diff --git a/backend/uptobox/uptobox.go b/backend/uptobox/uptobox.goindex 9006cf039..2e641e9c1 100644--- a/backend/uptobox/uptobox.go+++ b/backend/uptobox/uptobox.go@@ -304,7 +304,7 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err evar limit uint64 = 100 // max number of objects per request - 100 seems to be the maximum the api acceptsvar page uint64 = 1- var offset uint64 = 0 // for the next page of requests+ var offset uint64 // for the next page of requestsfor {opts := &api.MetadataRequestOptions{diff --git a/cmd/selfupdate/help.go b/cmd/selfupdate/help.goindex a428447b3..d3044bb11 100644--- a/cmd/selfupdate/help.go+++ b/cmd/selfupdate/help.go@@ -4,7 +4,7 @@package selfupdate// Note: "|" will be replaced by backticks in the help string below-var selfUpdateHelp string = `+var selfUpdateHelp = `This command downloads the latest release of rclone and replacesthe currently running binary. The download is verified with a hashsumand cryptographically signed signature.diff --git a/lib/http/http.go b/lib/http/http.goindex 28c2596d7..413a42526 100644--- a/lib/http/http.go+++ b/lib/http/http.go@@ -124,7 +124,7 @@ func NewServer(listeners, tlsListeners []net.Listener, opt Options) (Server, err}// Prepare TLS config- var tlsConfig *tls.Config = nil+ var tlsConfig *tls.ConfiguseSSL := useSSL(opt)if (opt.SslCert != "") != useSSL {diff --git a/vfs/vfs.go b/vfs/vfs.goindex 516596231..640edd246 100644--- a/vfs/vfs.go+++ b/vfs/vfs.go@@ -566,7 +566,7 @@ func (vfs *VFS) Statfs() (total, used, free int64) {vfs.usage, err = doAbout(ctx)}if vfs.Opt.UsedIsSize {- var usedBySizeAlgorithm int64 = 0+ var usedBySizeAlgorithm int64// Algorithm from `rclone size`err = walk.ListR(ctx, vfs.f, "", true, -1, walk.ListObjects, func(entries fs.DirEntries) error {entries.ForObject(func(o fs.Object) {