From 3423de65fac98e62e62fd90466ada1591b509f00 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 3 Jan 2016 14:12:01 +0000 Subject: [PATCH] Make canonical place for all fs in fs/all/all.go --- CONTRIBUTING.md | 3 +-- fs/all/all.go | 16 ++++++++++++++++ fs/operations_test.go | 14 +------------- rclone.go | 13 +------------ 4 files changed, 19 insertions(+), 27 deletions(-) create mode 100644 fs/all/all.go diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e22ffea7..76657147e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -133,7 +133,7 @@ Research Getting going * Create `remote/remote.go` (copy this from a similar fs) - * Add your fs to the imports in `rclone.go` + * Add your fs to the imports in `fs/all/all.go` Unit tests @@ -144,7 +144,6 @@ Unit tests Integration tests - * Add your fs to the imports in `fs/operations_test.go` * Add your fs to `fs/test_all.go` * Make sure integration tests pass with * `cd fs` diff --git a/fs/all/all.go b/fs/all/all.go new file mode 100644 index 000000000..d68efd6cf --- /dev/null +++ b/fs/all/all.go @@ -0,0 +1,16 @@ +package all + +import ( + // Active file systems + _ "github.com/ncw/rclone/amazonclouddrive" + _ "github.com/ncw/rclone/b2" + _ "github.com/ncw/rclone/drive" + _ "github.com/ncw/rclone/dropbox" + _ "github.com/ncw/rclone/googlecloudstorage" + _ "github.com/ncw/rclone/hubic" + _ "github.com/ncw/rclone/local" + _ "github.com/ncw/rclone/onedrive" + _ "github.com/ncw/rclone/s3" + _ "github.com/ncw/rclone/swift" + _ "github.com/ncw/rclone/yandex" +) diff --git a/fs/operations_test.go b/fs/operations_test.go index 6b3175b59..97026ccc4 100644 --- a/fs/operations_test.go +++ b/fs/operations_test.go @@ -17,20 +17,8 @@ import ( "time" "github.com/ncw/rclone/fs" + _ "github.com/ncw/rclone/fs/all" // import all fs "github.com/ncw/rclone/fstest" - - // Active file systems - _ "github.com/ncw/rclone/amazonclouddrive" - _ "github.com/ncw/rclone/b2" - _ "github.com/ncw/rclone/drive" - _ "github.com/ncw/rclone/dropbox" - _ "github.com/ncw/rclone/googlecloudstorage" - _ "github.com/ncw/rclone/hubic" - _ "github.com/ncw/rclone/local" - _ "github.com/ncw/rclone/onedrive" - _ "github.com/ncw/rclone/s3" - _ "github.com/ncw/rclone/swift" - _ "github.com/ncw/rclone/yandex" ) // Globals diff --git a/rclone.go b/rclone.go index 3149eb77c..17f9f1362 100644 --- a/rclone.go +++ b/rclone.go @@ -15,18 +15,7 @@ import ( "github.com/spf13/pflag" "github.com/ncw/rclone/fs" - // Active file systems - _ "github.com/ncw/rclone/amazonclouddrive" - _ "github.com/ncw/rclone/b2" - _ "github.com/ncw/rclone/drive" - _ "github.com/ncw/rclone/dropbox" - _ "github.com/ncw/rclone/googlecloudstorage" - _ "github.com/ncw/rclone/hubic" - _ "github.com/ncw/rclone/local" - _ "github.com/ncw/rclone/onedrive" - _ "github.com/ncw/rclone/s3" - _ "github.com/ncw/rclone/swift" - _ "github.com/ncw/rclone/yandex" + _ "github.com/ncw/rclone/fs/all" // import all fs ) // Globals