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

Move dircache, oauthutil, rest and pacer modules into lib

Nick Craig-Wood60afda007b3c
diff --git a/backend/amazonclouddrive/amazonclouddrive.go b/backend/amazonclouddrive/amazonclouddrive.go
index af1cf16bc..ccb4a9aaf 100644
--- a/backend/amazonclouddrive/amazonclouddrive.go
+++ b/backend/amazonclouddrive/amazonclouddrive.go
@@ -23,11 +23,11 @@ import (
"time"
"github.com/ncw/go-acd"
- "github.com/ncw/rclone/dircache"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/oauthutil"
- "github.com/ncw/rclone/pacer"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/dircache"
+ "github.com/ncw/rclone/lib/oauthutil"
+ "github.com/ncw/rclone/lib/pacer"
+ "github.com/ncw/rclone/lib/rest"
"github.com/pkg/errors"
"golang.org/x/oauth2"
)
diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.go
index 166b9f57b..b294eea3a 100644
--- a/backend/azureblob/azureblob.go
+++ b/backend/azureblob/azureblob.go
@@ -23,7 +23,7 @@ import (
"github.com/Azure/azure-sdk-for-go/storage"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/pacer"
+ "github.com/ncw/rclone/lib/pacer"
"github.com/pkg/errors"
)
diff --git a/backend/b2/b2.go b/backend/b2/b2.go
index 926e17a42..1648c51d5 100644
--- a/backend/b2/b2.go
+++ b/backend/b2/b2.go
@@ -21,8 +21,8 @@ import (
"github.com/ncw/rclone/backend/b2/api"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/pacer"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/pacer"
+ "github.com/ncw/rclone/lib/rest"
"github.com/pkg/errors"
)
diff --git a/backend/b2/upload.go b/backend/b2/upload.go
index 3519de727..f7d6234fc 100644
--- a/backend/b2/upload.go
+++ b/backend/b2/upload.go
@@ -16,7 +16,7 @@ import (
"github.com/ncw/rclone/backend/b2/api"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/rest"
"github.com/pkg/errors"
)
diff --git a/backend/box/box.go b/backend/box/box.go
index 7673a45ae..2ca6e35a2 100644
--- a/backend/box/box.go
+++ b/backend/box/box.go
@@ -22,11 +22,11 @@ import (
"time"
"github.com/ncw/rclone/backend/box/api"
- "github.com/ncw/rclone/dircache"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/oauthutil"
- "github.com/ncw/rclone/pacer"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/dircache"
+ "github.com/ncw/rclone/lib/oauthutil"
+ "github.com/ncw/rclone/lib/pacer"
+ "github.com/ncw/rclone/lib/rest"
"github.com/pkg/errors"
"golang.org/x/oauth2"
)
diff --git a/backend/box/upload.go b/backend/box/upload.go
index 66d8454d7..49771978d 100644
--- a/backend/box/upload.go
+++ b/backend/box/upload.go
@@ -16,7 +16,7 @@ import (
"github.com/ncw/rclone/backend/box/api"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/rest"
"github.com/pkg/errors"
)
diff --git a/backend/drive/drive.go b/backend/drive/drive.go
index 3adb2a73a..08f7ddeb3 100644
--- a/backend/drive/drive.go
+++ b/backend/drive/drive.go
@@ -20,10 +20,10 @@ import (
"strings"
"time"
- "github.com/ncw/rclone/dircache"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/oauthutil"
- "github.com/ncw/rclone/pacer"
+ "github.com/ncw/rclone/lib/dircache"
+ "github.com/ncw/rclone/lib/oauthutil"
+ "github.com/ncw/rclone/lib/pacer"
"github.com/pkg/errors"
"github.com/spf13/pflag"
"golang.org/x/oauth2"
diff --git a/backend/dropbox/dropbox.go b/backend/dropbox/dropbox.go
index 3b659c317..ab4623b27 100644
--- a/backend/dropbox/dropbox.go
+++ b/backend/dropbox/dropbox.go
@@ -34,8 +34,8 @@ import (
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/oauthutil"
- "github.com/ncw/rclone/pacer"
+ "github.com/ncw/rclone/lib/oauthutil"
+ "github.com/ncw/rclone/lib/pacer"
"github.com/pkg/errors"
"golang.org/x/oauth2"
)
diff --git a/backend/googlecloudstorage/googlecloudstorage.go b/backend/googlecloudstorage/googlecloudstorage.go
index b326f2c29..57a0a0bef 100644
--- a/backend/googlecloudstorage/googlecloudstorage.go
+++ b/backend/googlecloudstorage/googlecloudstorage.go
@@ -28,7 +28,7 @@ import (
"time"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/oauthutil"
+ "github.com/ncw/rclone/lib/oauthutil"
"github.com/pkg/errors"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
diff --git a/backend/http/http.go b/backend/http/http.go
index 3cf590125..5d2c888fb 100644
--- a/backend/http/http.go
+++ b/backend/http/http.go
@@ -17,7 +17,7 @@ import (
"time"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/rest"
"github.com/pkg/errors"
"golang.org/x/net/html"
)
diff --git a/backend/http/http_internal_test.go b/backend/http/http_internal_test.go
index 80b28d5d3..72f014127 100644
--- a/backend/http/http_internal_test.go
+++ b/backend/http/http_internal_test.go
@@ -16,7 +16,7 @@ import (
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/rest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/backend/hubic/hubic.go b/backend/hubic/hubic.go
index 4a45fca65..26e4fb31e 100644
--- a/backend/hubic/hubic.go
+++ b/backend/hubic/hubic.go
@@ -15,7 +15,7 @@ import (
"github.com/ncw/rclone/backend/swift"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/oauthutil"
+ "github.com/ncw/rclone/lib/oauthutil"
swiftLib "github.com/ncw/swift"
"github.com/pkg/errors"
"golang.org/x/oauth2"
diff --git a/backend/onedrive/onedrive.go b/backend/onedrive/onedrive.go
index 9f21fa163..52cd11923 100644
--- a/backend/onedrive/onedrive.go
+++ b/backend/onedrive/onedrive.go
@@ -15,11 +15,11 @@ import (
"time"
"github.com/ncw/rclone/backend/onedrive/api"
- "github.com/ncw/rclone/dircache"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/oauthutil"
- "github.com/ncw/rclone/pacer"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/dircache"
+ "github.com/ncw/rclone/lib/oauthutil"
+ "github.com/ncw/rclone/lib/pacer"
+ "github.com/ncw/rclone/lib/rest"
"github.com/pkg/errors"
"golang.org/x/oauth2"
)
diff --git a/backend/pcloud/pcloud.go b/backend/pcloud/pcloud.go
index c0c1dd8c4..1128b4f83 100644
--- a/backend/pcloud/pcloud.go
+++ b/backend/pcloud/pcloud.go
@@ -22,11 +22,11 @@ import (
"time"
"github.com/ncw/rclone/backend/pcloud/api"
- "github.com/ncw/rclone/dircache"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/oauthutil"
- "github.com/ncw/rclone/pacer"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/dircache"
+ "github.com/ncw/rclone/lib/oauthutil"
+ "github.com/ncw/rclone/lib/pacer"
+ "github.com/ncw/rclone/lib/rest"
"github.com/pkg/errors"
"golang.org/x/oauth2"
)
diff --git a/backend/s3/s3.go b/backend/s3/s3.go
index 8fcea2106..72ff06cc8 100644
--- a/backend/s3/s3.go
+++ b/backend/s3/s3.go
@@ -37,7 +37,7 @@ import (
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/rest"
"github.com/ncw/swift"
"github.com/pkg/errors"
)
diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go
index 709510993..cf837014b 100644
--- a/backend/webdav/webdav.go
+++ b/backend/webdav/webdav.go
@@ -30,8 +30,8 @@ import (
"github.com/ncw/rclone/backend/webdav/api"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/pacer"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/pacer"
+ "github.com/ncw/rclone/lib/rest"
"github.com/pkg/errors"
)
diff --git a/backend/yandex/yandex.go b/backend/yandex/yandex.go
index 181f9aeb4..75a3c2519 100644
--- a/backend/yandex/yandex.go
+++ b/backend/yandex/yandex.go
@@ -15,7 +15,7 @@ import (
yandex "github.com/ncw/rclone/backend/yandex/api"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/oauthutil"
+ "github.com/ncw/rclone/lib/oauthutil"
"github.com/pkg/errors"
"golang.org/x/oauth2"
)
diff --git a/cmd/serve/http/http.go b/cmd/serve/http/http.go
index ca7c76673..3c4b79284 100644
--- a/cmd/serve/http/http.go
+++ b/cmd/serve/http/http.go
@@ -11,7 +11,7 @@ import (
"github.com/ncw/rclone/cmd"
"github.com/ncw/rclone/fs"
- "github.com/ncw/rclone/rest"
+ "github.com/ncw/rclone/lib/rest"
"github.com/ncw/rclone/vfs"
"github.com/ncw/rclone/vfs/vfsflags"
"github.com/spf13/cobra"
diff --git a/dircache/dircache.go b/lib/dircache/dircache.go
similarity index 100%
rename from dircache/dircache.go
rename to lib/dircache/dircache.go
diff --git a/oauthutil/oauthutil.go b/lib/oauthutil/oauthutil.go
similarity index 100%
rename from oauthutil/oauthutil.go
rename to lib/oauthutil/oauthutil.go
diff --git a/oauthutil/oauthutil_new.go b/lib/oauthutil/oauthutil_new.go
similarity index 100%
rename from oauthutil/oauthutil_new.go
rename to lib/oauthutil/oauthutil_new.go
diff --git a/oauthutil/oauthutil_old.go b/lib/oauthutil/oauthutil_old.go
similarity index 100%
rename from oauthutil/oauthutil_old.go
rename to lib/oauthutil/oauthutil_old.go
diff --git a/oauthutil/renew.go b/lib/oauthutil/renew.go
similarity index 100%
rename from oauthutil/renew.go
rename to lib/oauthutil/renew.go
diff --git a/pacer/pacer.go b/lib/pacer/pacer.go
similarity index 100%
rename from pacer/pacer.go
rename to lib/pacer/pacer.go
diff --git a/pacer/pacer_test.go b/lib/pacer/pacer_test.go
similarity index 100%
rename from pacer/pacer_test.go
rename to lib/pacer/pacer_test.go
diff --git a/pacer/tokens.go b/lib/pacer/tokens.go
similarity index 100%
rename from pacer/tokens.go
rename to lib/pacer/tokens.go
diff --git a/pacer/tokens_test.go b/lib/pacer/tokens_test.go
similarity index 100%
rename from pacer/tokens_test.go
rename to lib/pacer/tokens_test.go
diff --git a/rest/rest.go b/lib/rest/rest.go
similarity index 100%
rename from rest/rest.go
rename to lib/rest/rest.go
diff --git a/rest/url.go b/lib/rest/url.go
similarity index 100%
rename from rest/url.go
rename to lib/rest/url.go
diff --git a/rest/url_test.go b/lib/rest/url_test.go
similarity index 100%
rename from rest/url_test.go
rename to lib/rest/url_test.go