diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.go index 8a3b0b36d..2d90306aa 100644 --- a/backend/azureblob/azureblob.go +++ b/backend/azureblob/azureblob.go @@ -19,7 +19,7 @@ import ( "path" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/Azure/azure-pipeline-go/pipeline" diff --git a/backend/b2/b2.go b/backend/b2/b2.go index b96feb225..3fe4082d5 100644 --- a/backend/b2/b2.go +++ b/backend/b2/b2.go @@ -17,7 +17,7 @@ import ( "path" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/backend/b2/api" diff --git a/backend/b2/upload.go b/backend/b2/upload.go index 827d33578..567ee7ac1 100644 --- a/backend/b2/upload.go +++ b/backend/b2/upload.go @@ -13,7 +13,7 @@ import ( gohash "hash" "io" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/backend/b2/api" "github.com/rclone/rclone/fs" diff --git a/backend/box/box.go b/backend/box/box.go index bde259cea..3f2a86df5 100644 --- a/backend/box/box.go +++ b/backend/box/box.go @@ -23,7 +23,7 @@ import ( "path" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "time" diff --git a/backend/box/upload.go b/backend/box/upload.go index c664cfbf5..30213a7f1 100644 --- a/backend/box/upload.go +++ b/backend/box/upload.go @@ -13,7 +13,7 @@ import ( "io" "net/http" "strconv" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/backend/box/api" diff --git a/backend/cache/cache.go b/backend/cache/cache.go index 1f1ab7c53..fd427747d 100644 --- a/backend/cache/cache.go +++ b/backend/cache/cache.go @@ -16,7 +16,7 @@ import ( "sort" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "syscall" "time" diff --git a/backend/cache/handle.go b/backend/cache/handle.go index a7a1497e1..61f1b136b 100644 --- a/backend/cache/handle.go +++ b/backend/cache/handle.go @@ -11,7 +11,7 @@ import ( "path" "runtime" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/backend/cache/object.go b/backend/cache/object.go index 8dc072017..5144d350b 100644 --- a/backend/cache/object.go +++ b/backend/cache/object.go @@ -8,7 +8,7 @@ import ( "fmt" "io" "path" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/backend/cache/plex.go b/backend/cache/plex.go index e3a333c73..bd88e4f45 100644 --- a/backend/cache/plex.go +++ b/backend/cache/plex.go @@ -12,7 +12,7 @@ import ( "net/http" "net/url" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" cache "github.com/patrickmn/go-cache" diff --git a/backend/cache/storage_persistent.go b/backend/cache/storage_persistent.go index 89af35f87..8ad6194f4 100644 --- a/backend/cache/storage_persistent.go +++ b/backend/cache/storage_persistent.go @@ -14,7 +14,7 @@ import ( "path" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/backend/chunker/chunker.go b/backend/chunker/chunker.go index 76bed2e6c..421bd2fc0 100644 --- a/backend/chunker/chunker.go +++ b/backend/chunker/chunker.go @@ -19,7 +19,7 @@ import ( "sort" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/backend/crypt/cipher.go b/backend/crypt/cipher.go index 4a3556295..bcc61fef7 100644 --- a/backend/crypt/cipher.go +++ b/backend/crypt/cipher.go @@ -13,7 +13,7 @@ import ( "io" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "unicode/utf8" diff --git a/backend/drive/drive.go b/backend/drive/drive.go index 01e3fd6a4..1ceaf4d15 100644 --- a/backend/drive/drive.go +++ b/backend/drive/drive.go @@ -21,7 +21,7 @@ import ( "sort" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "text/template" "time" diff --git a/backend/dropbox/batcher.go b/backend/dropbox/batcher.go index 96185dde3..f574ae961 100644 --- a/backend/dropbox/batcher.go +++ b/backend/dropbox/batcher.go @@ -10,7 +10,7 @@ import ( "context" "errors" "fmt" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/async" diff --git a/backend/filefabric/filefabric.go b/backend/filefabric/filefabric.go index 7f49579b4..c257dfea3 100644 --- a/backend/filefabric/filefabric.go +++ b/backend/filefabric/filefabric.go @@ -25,7 +25,7 @@ import ( "net/url" "path" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "time" diff --git a/backend/ftp/ftp.go b/backend/ftp/ftp.go index 15cbb5260..222d6e5e7 100644 --- a/backend/ftp/ftp.go +++ b/backend/ftp/ftp.go @@ -12,7 +12,7 @@ import ( "path" "runtime" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/jlaffaye/ftp" diff --git a/backend/googlephotos/albums.go b/backend/googlephotos/albums.go index 00cdbb914..856ddd6af 100644 --- a/backend/googlephotos/albums.go +++ b/backend/googlephotos/albums.go @@ -5,7 +5,7 @@ package googlephotos import ( "path" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/backend/googlephotos/api" ) diff --git a/backend/googlephotos/googlephotos.go b/backend/googlephotos/googlephotos.go index 7a07356be..c1bfe858b 100644 --- a/backend/googlephotos/googlephotos.go +++ b/backend/googlephotos/googlephotos.go @@ -15,7 +15,7 @@ import ( "regexp" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/backend/googlephotos/api" diff --git a/backend/hasher/hasher.go b/backend/hasher/hasher.go index 2d94895ee..3a844e1b9 100644 --- a/backend/hasher/hasher.go +++ b/backend/hasher/hasher.go @@ -9,7 +9,7 @@ import ( "io" "path" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/backend/http/http.go b/backend/http/http.go index 47a878bb3..46a95c948 100644 --- a/backend/http/http.go +++ b/backend/http/http.go @@ -15,7 +15,7 @@ import ( "path" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/backend/local/local.go b/backend/local/local.go index 5dc65ec6a..e13728000 100644 --- a/backend/local/local.go +++ b/backend/local/local.go @@ -13,7 +13,7 @@ import ( "path/filepath" "runtime" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "unicode/utf8" diff --git a/backend/local/remove_test.go b/backend/local/remove_test.go index b2e34cdc8..5b448086f 100644 --- a/backend/local/remove_test.go +++ b/backend/local/remove_test.go @@ -3,7 +3,7 @@ package local import ( "io/ioutil" "os" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" "time" diff --git a/backend/mailru/mailru.go b/backend/mailru/mailru.go index 4551eeae7..e5488dfda 100644 --- a/backend/mailru/mailru.go +++ b/backend/mailru/mailru.go @@ -12,7 +12,7 @@ import ( "sort" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "encoding/hex" diff --git a/backend/mega/mega.go b/backend/mega/mega.go index 7e154fe2d..f716d034e 100644 --- a/backend/mega/mega.go +++ b/backend/mega/mega.go @@ -22,7 +22,7 @@ import ( "io" "path" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/backend/memory/memory.go b/backend/memory/memory.go index 9675abcd3..cb2da6f44 100644 --- a/backend/memory/memory.go +++ b/backend/memory/memory.go @@ -11,7 +11,7 @@ import ( "io/ioutil" "path" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/backend/onedrive/onedrive.go b/backend/onedrive/onedrive.go index b49dcbf33..2d87a1eef 100644 --- a/backend/onedrive/onedrive.go +++ b/backend/onedrive/onedrive.go @@ -16,7 +16,7 @@ import ( "regexp" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/backend/onedrive/api" diff --git a/backend/qingstor/upload.go b/backend/qingstor/upload.go index d9a818019..60d580205 100644 --- a/backend/qingstor/upload.go +++ b/backend/qingstor/upload.go @@ -13,7 +13,7 @@ import ( "hash" "io" "sort" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/lib/atexit" diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 304eafb05..194187d5f 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -19,7 +19,7 @@ import ( "sort" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/aws/aws-sdk-go/aws" diff --git a/backend/seafile/pacer.go b/backend/seafile/pacer.go index 55680193e..85268595c 100644 --- a/backend/seafile/pacer.go +++ b/backend/seafile/pacer.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "net/url" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/backend/seafile/seafile.go b/backend/seafile/seafile.go index 76f9843ab..b4feb0c97 100644 --- a/backend/seafile/seafile.go +++ b/backend/seafile/seafile.go @@ -10,7 +10,7 @@ import ( "path" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/coreos/go-semver/semver" diff --git a/backend/sftp/sftp.go b/backend/sftp/sftp.go index 7df0f5286..254e4a370 100644 --- a/backend/sftp/sftp.go +++ b/backend/sftp/sftp.go @@ -17,7 +17,7 @@ import ( "regexp" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "time" diff --git a/backend/sftp/stringlock.go b/backend/sftp/stringlock.go index a5167a7da..0ab0f4d15 100644 --- a/backend/sftp/stringlock.go +++ b/backend/sftp/stringlock.go @@ -3,7 +3,7 @@ package sftp -import "sync" +import "github.com/rclone/rclone/lib/sync" // stringLock locks for string IDs passed in type stringLock struct { diff --git a/backend/sftp/stringlock_test.go b/backend/sftp/stringlock_test.go index 41b46a441..e0907aa98 100644 --- a/backend/sftp/stringlock_test.go +++ b/backend/sftp/stringlock_test.go @@ -5,7 +5,7 @@ package sftp import ( "fmt" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" "time" diff --git a/backend/sharefile/upload.go b/backend/sharefile/upload.go index eb8358b65..aa9f7b0c4 100644 --- a/backend/sharefile/upload.go +++ b/backend/sharefile/upload.go @@ -13,7 +13,7 @@ import ( "fmt" "io" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/backend/sharefile/api" "github.com/rclone/rclone/fs" diff --git a/backend/sugarsync/sugarsync.go b/backend/sugarsync/sugarsync.go index 4b57f4184..cb13f61bb 100644 --- a/backend/sugarsync/sugarsync.go +++ b/backend/sugarsync/sugarsync.go @@ -23,7 +23,7 @@ import ( "regexp" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/backend/sugarsync/api" diff --git a/backend/union/entry.go b/backend/union/entry.go index 1123183d8..df705c272 100644 --- a/backend/union/entry.go +++ b/backend/union/entry.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "io" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/backend/union/upstream" diff --git a/backend/union/policy/epall.go b/backend/union/policy/epall.go index 24ce7c6b2..3d4a6bb82 100644 --- a/backend/union/policy/epall.go +++ b/backend/union/policy/epall.go @@ -3,7 +3,7 @@ package policy import ( "context" "path" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/backend/union/upstream" "github.com/rclone/rclone/fs" diff --git a/backend/union/policy/newest.go b/backend/union/policy/newest.go index 8ac8ff639..d55ae0736 100644 --- a/backend/union/policy/newest.go +++ b/backend/union/policy/newest.go @@ -3,7 +3,7 @@ package policy import ( "context" "path" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/backend/union/upstream" diff --git a/backend/union/union.go b/backend/union/union.go index f26bdd114..d8f210370 100644 --- a/backend/union/union.go +++ b/backend/union/union.go @@ -9,7 +9,7 @@ import ( "path" "path/filepath" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/backend/union/policy" diff --git a/backend/union/upstream/upstream.go b/backend/union/upstream/upstream.go index 93b8ae521..c807cb144 100644 --- a/backend/union/upstream/upstream.go +++ b/backend/union/upstream/upstream.go @@ -9,7 +9,7 @@ import ( "path" "path/filepath" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "time" diff --git a/backend/webdav/api/types.go b/backend/webdav/api/types.go index 44bdc7e27..60296d250 100644 --- a/backend/webdav/api/types.go +++ b/backend/webdav/api/types.go @@ -6,7 +6,7 @@ import ( "regexp" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go index 9564ae601..66659e546 100644 --- a/backend/webdav/webdav.go +++ b/backend/webdav/webdav.go @@ -21,7 +21,7 @@ import ( "path" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/backend/webdav/api" diff --git a/bin/cross-compile.go b/bin/cross-compile.go index d77250b2a..3b1640335 100644 --- a/bin/cross-compile.go +++ b/bin/cross-compile.go @@ -19,7 +19,7 @@ import ( "runtime" "sort" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "text/template" "time" diff --git a/cmd/cmd.go b/cmd/cmd.go index a9f0e910f..3c76bc1f6 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -19,7 +19,7 @@ import ( "runtime/pprof" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/cmd/cmount/fs.go b/cmd/cmount/fs.go index d627a9829..17c11bfd0 100644 --- a/cmd/cmount/fs.go +++ b/cmd/cmount/fs.go @@ -9,7 +9,7 @@ import ( "io" "os" "path" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "time" diff --git a/cmd/mount/test/seekers.go b/cmd/mount/test/seekers.go index 571ecf87b..bf2338721 100644 --- a/cmd/mount/test/seekers.go +++ b/cmd/mount/test/seekers.go @@ -12,7 +12,7 @@ import ( "os" "path/filepath" "sort" - "sync" + "github.com/rclone/rclone/lib/sync" "time" ) diff --git a/cmd/mountlib/mount.go b/cmd/mountlib/mount.go index 60d2661e7..11235c94b 100644 --- a/cmd/mountlib/mount.go +++ b/cmd/mountlib/mount.go @@ -7,7 +7,7 @@ import ( "os" "runtime" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/cmd" diff --git a/cmd/mountlib/rc.go b/cmd/mountlib/rc.go index 2262ecfa8..02cf81f5a 100644 --- a/cmd/mountlib/rc.go +++ b/cmd/mountlib/rc.go @@ -5,7 +5,7 @@ import ( "errors" "log" "sort" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/cmd/ncdu/scan/scan.go b/cmd/ncdu/scan/scan.go index 292e78426..efed672c7 100644 --- a/cmd/ncdu/scan/scan.go +++ b/cmd/ncdu/scan/scan.go @@ -5,7 +5,7 @@ import ( "context" "fmt" "path" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/walk" diff --git a/cmd/progress.go b/cmd/progress.go index 56556db2e..7beb5aef1 100644 --- a/cmd/progress.go +++ b/cmd/progress.go @@ -6,7 +6,7 @@ import ( "bytes" "fmt" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/cmd/rcd/rcd.go b/cmd/rcd/rcd.go index cc4be57f9..f3085b004 100644 --- a/cmd/rcd/rcd.go +++ b/cmd/rcd/rcd.go @@ -3,7 +3,7 @@ package rcd import ( "context" "log" - "sync" + "github.com/rclone/rclone/lib/sync" sysdnotify "github.com/iguanesolutions/go-systemd/v5/notify" "github.com/rclone/rclone/cmd" diff --git a/cmd/serve/docker/driver.go b/cmd/serve/docker/driver.go index 6b1db258c..982ba7306 100644 --- a/cmd/serve/docker/driver.go +++ b/cmd/serve/docker/driver.go @@ -10,7 +10,7 @@ import ( "path/filepath" "reflect" "sort" - "sync" + "github.com/rclone/rclone/lib/sync" "time" sysdnotify "github.com/iguanesolutions/go-systemd/v5/notify" diff --git a/cmd/serve/ftp/ftp.go b/cmd/serve/ftp/ftp.go index a2a4df159..e587a3cd2 100644 --- a/cmd/serve/ftp/ftp.go +++ b/cmd/serve/ftp/ftp.go @@ -14,7 +14,7 @@ import ( "os" "os/user" "strconv" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/cmd" diff --git a/cmd/serve/restic/cache.go b/cmd/serve/restic/cache.go index 407823581..72f54a95b 100644 --- a/cmd/serve/restic/cache.go +++ b/cmd/serve/restic/cache.go @@ -5,7 +5,7 @@ package restic import ( "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" ) diff --git a/cmd/test/info/info.go b/cmd/test/info/info.go index 06cdd74e9..4db61f2ec 100644 --- a/cmd/test/info/info.go +++ b/cmd/test/info/info.go @@ -16,7 +16,7 @@ import ( "sort" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/cmd" diff --git a/cmd/test/memory/memory.go b/cmd/test/memory/memory.go index 823cade14..228c60d50 100644 --- a/cmd/test/memory/memory.go +++ b/cmd/test/memory/memory.go @@ -3,7 +3,7 @@ package memory import ( "context" "runtime" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/cmd/test" diff --git a/fs/accounting/accounting.go b/fs/accounting/accounting.go index e3ed4972c..fd9acadc0 100644 --- a/fs/accounting/accounting.go +++ b/fs/accounting/accounting.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" "io" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "unicode/utf8" diff --git a/fs/accounting/inprogress.go b/fs/accounting/inprogress.go index 7fcbad781..69605ddb2 100644 --- a/fs/accounting/inprogress.go +++ b/fs/accounting/inprogress.go @@ -2,7 +2,7 @@ package accounting import ( "context" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" ) diff --git a/fs/accounting/stats.go b/fs/accounting/stats.go index b4b32a8ee..23fbf94ff 100644 --- a/fs/accounting/stats.go +++ b/fs/accounting/stats.go @@ -6,7 +6,7 @@ import ( "fmt" "sort" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/fs/accounting/stats_groups.go b/fs/accounting/stats_groups.go index 28548cfc9..97dbdcf50 100644 --- a/fs/accounting/stats_groups.go +++ b/fs/accounting/stats_groups.go @@ -2,7 +2,7 @@ package accounting import ( "context" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs/rc" diff --git a/fs/accounting/token_bucket.go b/fs/accounting/token_bucket.go index c875c568f..3fb0c2b29 100644 --- a/fs/accounting/token_bucket.go +++ b/fs/accounting/token_bucket.go @@ -4,11 +4,11 @@ import ( "context" "errors" "fmt" - "sync" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/rc" + "github.com/rclone/rclone/lib/sync" "golang.org/x/time/rate" ) diff --git a/fs/accounting/transfer.go b/fs/accounting/transfer.go index 09d27cf17..d6638d73e 100644 --- a/fs/accounting/transfer.go +++ b/fs/accounting/transfer.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "io" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/fs/accounting/transfermap.go b/fs/accounting/transfermap.go index ed64bf369..bb3906677 100644 --- a/fs/accounting/transfermap.go +++ b/fs/accounting/transfermap.go @@ -5,7 +5,7 @@ import ( "fmt" "sort" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/rc" diff --git a/fs/asyncreader/asyncreader.go b/fs/asyncreader/asyncreader.go index 44f8fb245..2570b7761 100644 --- a/fs/asyncreader/asyncreader.go +++ b/fs/asyncreader/asyncreader.go @@ -6,7 +6,7 @@ import ( "context" "errors" "io" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/fs/asyncreader/asyncreader_test.go b/fs/asyncreader/asyncreader_test.go index 342494d06..56884afb8 100644 --- a/fs/asyncreader/asyncreader_test.go +++ b/fs/asyncreader/asyncreader_test.go @@ -9,7 +9,7 @@ import ( "io/ioutil" "math/rand" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" "testing/iotest" "time" diff --git a/fs/cache/cache.go b/fs/cache/cache.go index f59561888..b875e8d41 100644 --- a/fs/cache/cache.go +++ b/fs/cache/cache.go @@ -4,7 +4,7 @@ package cache import ( "context" "runtime" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/filter" diff --git a/fs/chunkedreader/chunkedreader.go b/fs/chunkedreader/chunkedreader.go index 1e29ea736..277f2523d 100644 --- a/fs/chunkedreader/chunkedreader.go +++ b/fs/chunkedreader/chunkedreader.go @@ -4,7 +4,7 @@ import ( "context" "errors" "io" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/hash" diff --git a/fs/config/configfile/configfile.go b/fs/config/configfile/configfile.go index 65971492d..80e842f52 100644 --- a/fs/config/configfile/configfile.go +++ b/fs/config/configfile/configfile.go @@ -8,7 +8,7 @@ import ( "os" "path/filepath" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/Unknwon/goconfig" "github.com/rclone/rclone/fs" diff --git a/fs/config/default_storage.go b/fs/config/default_storage.go index 4debac0be..4294e5b71 100644 --- a/fs/config/default_storage.go +++ b/fs/config/default_storage.go @@ -2,7 +2,7 @@ package config import ( "encoding/json" - "sync" + "github.com/rclone/rclone/lib/sync" ) // defaultStorage implements config.Storage, providing in-memory config. diff --git a/fs/filter/filter_test.go b/fs/filter/filter_test.go index 3d5439fe2..fbdbc15f0 100644 --- a/fs/filter/filter_test.go +++ b/fs/filter/filter_test.go @@ -6,7 +6,7 @@ import ( "io/ioutil" "os" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" "time" diff --git a/fs/fs_test.go b/fs/fs_test.go index 4e316b9b5..581a48d81 100644 --- a/fs/fs_test.go +++ b/fs/fs_test.go @@ -7,7 +7,7 @@ import ( "fmt" "os" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" "time" diff --git a/fs/fshttp/dialer.go b/fs/fshttp/dialer.go index adeece185..7fc4f439c 100644 --- a/fs/fshttp/dialer.go +++ b/fs/fshttp/dialer.go @@ -5,7 +5,7 @@ import ( "net" "runtime" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/fs/fshttp/http.go b/fs/fshttp/http.go index ef7cf2851..7fa607a1a 100644 --- a/fs/fshttp/http.go +++ b/fs/fshttp/http.go @@ -12,7 +12,7 @@ import ( "net/http" "net/http/cookiejar" "net/http/httputil" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/fs/march/march.go b/fs/march/march.go index db045156d..39fdd716c 100644 --- a/fs/march/march.go +++ b/fs/march/march.go @@ -7,7 +7,7 @@ import ( "path" "sort" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/dirtree" diff --git a/fs/march/march_test.go b/fs/march/march_test.go index 31814255e..6b121adb5 100644 --- a/fs/march/march_test.go +++ b/fs/march/march_test.go @@ -7,7 +7,7 @@ import ( "errors" "fmt" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" _ "github.com/rclone/rclone/backend/local" diff --git a/fs/operations/check.go b/fs/operations/check.go index 12c63e701..b3fd7105a 100644 --- a/fs/operations/check.go +++ b/fs/operations/check.go @@ -10,7 +10,7 @@ import ( "os" "regexp" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "github.com/rclone/rclone/fs" diff --git a/fs/operations/operations.go b/fs/operations/operations.go index dcf296b90..f4ca11c73 100644 --- a/fs/operations/operations.go +++ b/fs/operations/operations.go @@ -18,7 +18,7 @@ import ( "sort" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "time" diff --git a/fs/operations/reopen.go b/fs/operations/reopen.go index 1f575d7cc..c56fcff50 100644 --- a/fs/operations/reopen.go +++ b/fs/operations/reopen.go @@ -4,7 +4,7 @@ import ( "context" "errors" "io" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/fserrors" diff --git a/fs/rc/jobs/job.go b/fs/rc/jobs/job.go index e452fe241..be4eb60ba 100644 --- a/fs/rc/jobs/job.go +++ b/fs/rc/jobs/job.go @@ -7,7 +7,7 @@ import ( "errors" "fmt" "runtime/debug" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "time" diff --git a/fs/rc/rcserver/rcserver.go b/fs/rc/rcserver/rcserver.go index 5e5ae84f5..393c16f0f 100644 --- a/fs/rc/rcserver/rcserver.go +++ b/fs/rc/rcserver/rcserver.go @@ -15,7 +15,7 @@ import ( "regexp" "sort" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/prometheus/client_golang/prometheus" diff --git a/fs/rc/registry.go b/fs/rc/registry.go index 8cc11d526..082f25145 100644 --- a/fs/rc/registry.go +++ b/fs/rc/registry.go @@ -6,7 +6,7 @@ import ( "context" "sort" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" ) // Func defines a type for a remote control function diff --git a/fs/rc/webgui/plugins.go b/fs/rc/webgui/plugins.go index 3a97fd679..9979f3b5a 100644 --- a/fs/rc/webgui/plugins.go +++ b/fs/rc/webgui/plugins.go @@ -12,7 +12,7 @@ import ( "path/filepath" "regexp" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config" diff --git a/fs/sync/pipe.go b/fs/sync/pipe.go index a2aa701bc..9120aa03c 100644 --- a/fs/sync/pipe.go +++ b/fs/sync/pipe.go @@ -6,7 +6,7 @@ import ( "math/bits" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/aalpar/deheap" "github.com/rclone/rclone/fs" diff --git a/fs/sync/pipe_test.go b/fs/sync/pipe_test.go index 84c9129e5..91de4c1f9 100644 --- a/fs/sync/pipe_test.go +++ b/fs/sync/pipe_test.go @@ -3,7 +3,7 @@ package sync import ( "container/heap" "context" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "testing" diff --git a/fs/sync/sync.go b/fs/sync/sync.go index 4c9e0f959..d61fa6834 100644 --- a/fs/sync/sync.go +++ b/fs/sync/sync.go @@ -8,7 +8,7 @@ import ( "path" "sort" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/fs/walk/walk.go b/fs/walk/walk.go index 56418b522..572abc6ae 100644 --- a/fs/walk/walk.go +++ b/fs/walk/walk.go @@ -8,7 +8,7 @@ import ( "path" "sort" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/fs/walk/walk_test.go b/fs/walk/walk_test.go index 79ccbf373..7278c5198 100644 --- a/fs/walk/walk_test.go +++ b/fs/walk/walk_test.go @@ -6,7 +6,7 @@ import ( "fmt" "io" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" "github.com/rclone/rclone/fs" diff --git a/fstest/test_all/run.go b/fstest/test_all/run.go index f082c55e1..e23adfc19 100644 --- a/fstest/test_all/run.go +++ b/fstest/test_all/run.go @@ -17,7 +17,7 @@ import ( "sort" "strconv" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/fstest/testserver/testserver.go b/fstest/testserver/testserver.go index 005096e85..e730e6f70 100644 --- a/fstest/testserver/testserver.go +++ b/fstest/testserver/testserver.go @@ -11,7 +11,7 @@ import ( "path/filepath" "regexp" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/go.mod b/go.mod index 6f51e2999..d7dad02d2 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/Azure/azure-storage-blob-go v0.14.0 github.com/Azure/go-autorest/autorest/adal v0.9.17 github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c - github.com/Max-Sum/base32768 v0.0.0-20191205131208-7937843c71d5 // indirect + github.com/Max-Sum/base32768 v0.0.0-20191205131208-7937843c71d5 github.com/Unknwon/goconfig v0.0.0-20200908083735-df7de6a44db8 github.com/a8m/tree v0.0.0-20210414114729-ce3525c5c2ef github.com/aalpar/deheap v0.0.0-20210914013432-0cc84d79dec3 @@ -49,6 +49,7 @@ require ( github.com/prometheus/client_golang v1.11.0 github.com/putdotio/go-putio/putio v0.0.0-20200123120452-16d982cac2b8 github.com/rfjakob/eme v1.1.2 + github.com/sasha-s/go-deadlock v0.3.1 github.com/shirou/gopsutil/v3 v3.21.10 github.com/sirupsen/logrus v1.8.1 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 @@ -108,6 +109,7 @@ require ( github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14 // indirect + github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.32.1 // indirect github.com/prometheus/procfs v0.7.3 // indirect diff --git a/go.sum b/go.sum index dc3beb78f..2fcb757b9 100644 --- a/go.sum +++ b/go.sum @@ -502,6 +502,8 @@ github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwp github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14 h1:XeOYlK9W1uCmhjJSsY78Mcuh7MVkNjTzmHx1yBzizSU= github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14/go.mod h1:jVblp62SafmidSkvWrXyxAme3gaTfEtWwRPGz5cpvHg= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -555,6 +557,8 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8= +github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= +github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil/v3 v3.21.10 h1:flTg1DrnV/UVrBqjLgVgDJzx6lf+91rC64/dBHmO2IA= diff --git a/lib/atexit/atexit.go b/lib/atexit/atexit.go index bcc851847..6651b3a17 100644 --- a/lib/atexit/atexit.go +++ b/lib/atexit/atexit.go @@ -7,7 +7,7 @@ package atexit import ( "os" "os/signal" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "github.com/rclone/rclone/fs" diff --git a/lib/bucket/bucket.go b/lib/bucket/bucket.go index f77887129..4a180bc5c 100644 --- a/lib/bucket/bucket.go +++ b/lib/bucket/bucket.go @@ -4,7 +4,7 @@ package bucket import ( "errors" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" ) var ( diff --git a/lib/cache/cache.go b/lib/cache/cache.go index f9533c137..670be82d0 100644 --- a/lib/cache/cache.go +++ b/lib/cache/cache.go @@ -4,7 +4,7 @@ package cache import ( "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" ) diff --git a/lib/dircache/dircache.go b/lib/dircache/dircache.go index 05766335d..acb851377 100644 --- a/lib/dircache/dircache.go +++ b/lib/dircache/dircache.go @@ -11,7 +11,7 @@ import ( "fmt" "path" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" ) diff --git a/lib/encoder/filename/decode.go b/lib/encoder/filename/decode.go index 6e859fd31..c75284969 100644 --- a/lib/encoder/filename/decode.go +++ b/lib/encoder/filename/decode.go @@ -5,7 +5,7 @@ import ( "encoding/base64" "encoding/binary" "errors" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/dop251/scsu" "github.com/klauspost/compress/huff0" diff --git a/lib/encoder/filename/init.go b/lib/encoder/filename/init.go index 0cbc53c3c..fcd4b1883 100644 --- a/lib/encoder/filename/init.go +++ b/lib/encoder/filename/init.go @@ -2,7 +2,7 @@ package filename import ( "encoding/base64" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/klauspost/compress/huff0" ) diff --git a/lib/file/preallocate_unix.go b/lib/file/preallocate_unix.go index e6f85272c..d486b8545 100644 --- a/lib/file/preallocate_unix.go +++ b/lib/file/preallocate_unix.go @@ -5,7 +5,7 @@ package file import ( "os" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "syscall" diff --git a/lib/file/preallocate_windows.go b/lib/file/preallocate_windows.go index 49352356a..38ab0039c 100644 --- a/lib/file/preallocate_windows.go +++ b/lib/file/preallocate_windows.go @@ -6,7 +6,7 @@ package file import ( "fmt" "os" - "sync" + "github.com/rclone/rclone/lib/sync" "syscall" "unsafe" diff --git a/lib/http/http.go b/lib/http/http.go index d6ff1452a..168f5cd17 100644 --- a/lib/http/http.go +++ b/lib/http/http.go @@ -12,7 +12,7 @@ import ( "net" "net/http" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/go-chi/chi/v5" diff --git a/lib/kv/bolt.go b/lib/kv/bolt.go index 5f9f3d7a6..55229e01f 100644 --- a/lib/kv/bolt.go +++ b/lib/kv/bolt.go @@ -9,7 +9,7 @@ import ( "os" "path/filepath" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/lib/kv/internal_test.go b/lib/kv/internal_test.go index ae40c6ed4..53bf67524 100644 --- a/lib/kv/internal_test.go +++ b/lib/kv/internal_test.go @@ -6,7 +6,7 @@ package kv import ( "context" "fmt" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" "github.com/stretchr/testify/assert" diff --git a/lib/oauthutil/oauthutil.go b/lib/oauthutil/oauthutil.go index 2203a0e47..6113d24fd 100644 --- a/lib/oauthutil/oauthutil.go +++ b/lib/oauthutil/oauthutil.go @@ -10,7 +10,7 @@ import ( "net/http" "net/url" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/lib/pacer/pacer.go b/lib/pacer/pacer.go index 0257d70da..c08ee8951 100644 --- a/lib/pacer/pacer.go +++ b/lib/pacer/pacer.go @@ -2,7 +2,7 @@ package pacer import ( - "sync" + "github.com/rclone/rclone/lib/sync" "time" liberrors "github.com/rclone/rclone/lib/errors" diff --git a/lib/pacer/pacer_test.go b/lib/pacer/pacer_test.go index 11aebb4ab..ecba87688 100644 --- a/lib/pacer/pacer_test.go +++ b/lib/pacer/pacer_test.go @@ -2,10 +2,10 @@ package pacer import ( "errors" - "sync" "testing" "time" + "github.com/rclone/rclone/lib/sync" "github.com/stretchr/testify/assert" ) diff --git a/lib/pool/pool.go b/lib/pool/pool.go index cf0ed93e2..cfe2c286b 100644 --- a/lib/pool/pool.go +++ b/lib/pool/pool.go @@ -5,7 +5,7 @@ package pool import ( "fmt" "log" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/lib/mmap" diff --git a/lib/readers/repeatable.go b/lib/readers/repeatable.go index 73de3fe90..9953000b6 100644 --- a/lib/readers/repeatable.go +++ b/lib/readers/repeatable.go @@ -3,7 +3,8 @@ package readers import ( "errors" "io" - "sync" + + "github.com/rclone/rclone/lib/sync" ) // A RepeatableReader implements the io.ReadSeeker it allow to seek cached data diff --git a/lib/rest/rest.go b/lib/rest/rest.go index e534b0d1e..b491ffc88 100644 --- a/lib/rest/rest.go +++ b/lib/rest/rest.go @@ -15,7 +15,7 @@ import ( "mime/multipart" "net/http" "net/url" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/lib/readers" diff --git a/lib/terminal/terminal.go b/lib/terminal/terminal.go index 4eda1abab..c23790f6c 100644 --- a/lib/terminal/terminal.go +++ b/lib/terminal/terminal.go @@ -6,7 +6,7 @@ import ( "io" "os" "runtime" - "sync" + "github.com/rclone/rclone/lib/sync" colorable "github.com/mattn/go-colorable" ) diff --git a/vfs/dir.go b/vfs/dir.go index 2b2eda5a2..e200a401f 100644 --- a/vfs/dir.go +++ b/vfs/dir.go @@ -7,7 +7,7 @@ import ( "path" "sort" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "time" diff --git a/vfs/file.go b/vfs/file.go index 4c4fc214a..13698f81e 100644 --- a/vfs/file.go +++ b/vfs/file.go @@ -6,7 +6,7 @@ import ( "fmt" "os" "path" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "time" diff --git a/vfs/read.go b/vfs/read.go index a128b0313..6822d0789 100644 --- a/vfs/read.go +++ b/vfs/read.go @@ -6,7 +6,7 @@ import ( "fmt" "io" "os" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/vfs/read_write.go b/vfs/read_write.go index a66ea051f..d57f5fbd4 100644 --- a/vfs/read_write.go +++ b/vfs/read_write.go @@ -4,7 +4,7 @@ import ( "fmt" "io" "os" - "sync" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/log" diff --git a/vfs/test_vfs/test_vfs.go b/vfs/test_vfs/test_vfs.go index bd11ac02c..e14d83cfd 100644 --- a/vfs/test_vfs/test_vfs.go +++ b/vfs/test_vfs/test_vfs.go @@ -13,7 +13,7 @@ import ( "math/rand" "os" "path" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "time" diff --git a/vfs/vfs.go b/vfs/vfs.go index 640edd246..d65bf437c 100644 --- a/vfs/vfs.go +++ b/vfs/vfs.go @@ -29,7 +29,7 @@ import ( "path" "sort" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "sync/atomic" "time" diff --git a/vfs/vfscache/cache.go b/vfs/vfscache/cache.go index 88d1f2f24..d84218728 100644 --- a/vfs/vfscache/cache.go +++ b/vfs/vfscache/cache.go @@ -11,7 +11,7 @@ import ( "runtime" "sort" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "time" sysdnotify "github.com/iguanesolutions/go-systemd/v5/notify" diff --git a/vfs/vfscache/downloaders/downloaders.go b/vfs/vfscache/downloaders/downloaders.go index c6d769a4f..c8dfeffa9 100644 --- a/vfs/vfscache/downloaders/downloaders.go +++ b/vfs/vfscache/downloaders/downloaders.go @@ -4,7 +4,6 @@ import ( "context" "errors" "fmt" - "sync" "time" "github.com/rclone/rclone/fs" @@ -13,6 +12,7 @@ import ( "github.com/rclone/rclone/fs/chunkedreader" "github.com/rclone/rclone/fs/fserrors" "github.com/rclone/rclone/lib/ranges" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/vfs/vfscommon" ) diff --git a/vfs/vfscache/downloaders/downloaders_test.go b/vfs/vfscache/downloaders/downloaders_test.go index 462a06a61..b5ae58194 100644 --- a/vfs/vfscache/downloaders/downloaders_test.go +++ b/vfs/vfscache/downloaders/downloaders_test.go @@ -4,7 +4,7 @@ import ( "context" "io" "io/ioutil" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" "time" diff --git a/vfs/vfscache/item.go b/vfs/vfscache/item.go index 6e06bcd51..7aee3cd88 100644 --- a/vfs/vfscache/item.go +++ b/vfs/vfscache/item.go @@ -7,7 +7,7 @@ import ( "fmt" "io" "os" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/vfs/vfscache/item_test.go b/vfs/vfscache/item_test.go index 59561708b..b1dcf75e1 100644 --- a/vfs/vfscache/item_test.go +++ b/vfs/vfscache/item_test.go @@ -9,7 +9,7 @@ import ( "io/ioutil" "math/rand" "os" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" "time" diff --git a/vfs/vfscache/writeback/writeback.go b/vfs/vfscache/writeback/writeback.go index 5f63f5461..6dcba7d9c 100644 --- a/vfs/vfscache/writeback/writeback.go +++ b/vfs/vfscache/writeback/writeback.go @@ -6,11 +6,11 @@ import ( "container/heap" "context" "errors" - "sync" "sync/atomic" "time" "github.com/rclone/rclone/fs" + "github.com/rclone/rclone/lib/sync" "github.com/rclone/rclone/vfs/vfscommon" ) diff --git a/vfs/vfscache/writeback/writeback_test.go b/vfs/vfscache/writeback/writeback_test.go index 512d0eeb7..cc0c63124 100644 --- a/vfs/vfscache/writeback/writeback_test.go +++ b/vfs/vfscache/writeback/writeback_test.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" "strings" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" "time" diff --git a/vfs/write.go b/vfs/write.go index 4f0590312..86fe39180 100644 --- a/vfs/write.go +++ b/vfs/write.go @@ -4,7 +4,7 @@ import ( "context" "io" "os" - "sync" + "github.com/rclone/rclone/lib/sync" "time" "github.com/rclone/rclone/fs" diff --git a/vfs/write_test.go b/vfs/write_test.go index 99f5d63b2..49d64ae66 100644 --- a/vfs/write_test.go +++ b/vfs/write_test.go @@ -5,7 +5,7 @@ import ( "errors" "io" "os" - "sync" + "github.com/rclone/rclone/lib/sync" "testing" "time"