"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
Fix niggles found by go vet
Nick Craig-Woodfe6873726831
diff --git a/drive/drive.go b/drive/drive.goindex 16f67ae22..a819dac02 100644--- a/drive/drive.go+++ b/drive/drive.go@@ -76,7 +76,7 @@ type FsDrive struct {rootId string // Id of the root directoryfoundRoot bool // Whether we have found the root or notfindRootLock sync.Mutex // Protect findRoot from concurrent use- dirCache dirCache // Map of directory path to directory id+ dirCache *dirCache // Map of directory path to directory idfindDirLock sync.Mutex // Protect findDir from concurrent usepacer chan struct{} // To pace the operationssleepTime time.Duration // Time to sleep for each transaction@@ -101,8 +101,8 @@ type dirCache struct {}// Make a new locked map-func newDirCache() dirCache {- d := dirCache{}+func newDirCache() *dirCache {+ d := &dirCache{}d.Flush()return d}diff --git a/fs/config.go b/fs/config.goindex a68c89605..faf7e02cb 100644--- a/fs/config.go+++ b/fs/config.go@@ -61,7 +61,6 @@ func (x *SizeSuffix) String() string {default:return fmt.Sprintf("%.3fG", float64(*x)/1024/1024/1024)}- panic("shouldn't be reached")}// Set a SizeSuffixdiff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.goindex 56079f4a8..4d6e8dd87 100644--- a/fstest/fstests/fstests.go+++ b/fstest/fstests/fstests.go@@ -109,7 +109,7 @@ func TestFsListEmpty(t *testing.T) {func TestFsListDirEmpty(t *testing.T) {skipIfNotOk(t)for obj := range remote.ListDir() {- t.Error("Found unexpected item %q", obj.Name)+ t.Errorf("Found unexpected item %q", obj.Name)}}@@ -174,7 +174,7 @@ func TestFsListDirRoot(t *testing.T) {skipIfNotOk(t)rootRemote, err := fs.NewFs(RemoteName)if err != nil {- t.Fatal("Failed to make remote %q: %v", RemoteName, err)+ t.Fatalf("Failed to make remote %q: %v", RemoteName, err)}found := falsefor obj := range rootRemote.ListDir() {@@ -191,7 +191,7 @@ func TestFsListRoot(t *testing.T) {skipIfNotOk(t)rootRemote, err := fs.NewFs(RemoteName)if err != nil {- t.Fatal("Failed to make remote %q: %v", RemoteName, err)+ t.Fatalf("Failed to make remote %q: %v", RemoteName, err)}// Should either find file1 and file2 or nothingfound1 := false@@ -384,7 +384,7 @@ func TestLimitedFs(t *testing.T) {file2Copy.Path = "z.txt"fileRemote, err := fs.NewFs(remoteName)if err != nil {- t.Fatal("Failed to make remote %q: %v", remoteName, err)+ t.Fatalf("Failed to make remote %q: %v", remoteName, err)}fstest.CheckListing(t, fileRemote, []fstest.Item{file2Copy})_, ok := fileRemote.(*fs.Limited)@@ -398,7 +398,7 @@ func TestLimitedFsNotFound(t *testing.T) {remoteName := subRemoteName + "/not found.txt"fileRemote, err := fs.NewFs(remoteName)if err != nil {- t.Fatal("Failed to make remote %q: %v", remoteName, err)+ t.Fatalf("Failed to make remote %q: %v", remoteName, err)}fstest.CheckListing(t, fileRemote, []fstest.Item{})_, ok := fileRemote.(*fs.Limited)