From 0b3c40280166d3fdd0fde6e061be137819bd2d57 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 14 May 2018 22:37:28 +0200 Subject: [PATCH] Move options package to ui/options --- cmd/restic/cmd_options.go | 2 +- cmd/restic/global.go | 2 +- cmd/restic/integration_helpers_test.go | 2 +- cmd/restic/main.go | 2 +- internal/backend/azure/config.go | 2 +- internal/backend/b2/config.go | 2 +- internal/backend/gs/config.go | 2 +- internal/backend/local/config.go | 2 +- internal/backend/rclone/config.go | 2 +- internal/backend/rest/config.go | 2 +- internal/backend/s3/config.go | 2 +- internal/backend/semaphore.go | 3 ++- internal/backend/sftp/config.go | 2 +- internal/backend/swift/config.go | 2 +- internal/{ => ui}/options/options.go | 0 internal/{ => ui}/options/options_test.go | 0 16 files changed, 15 insertions(+), 14 deletions(-) rename internal/{ => ui}/options/options.go (100%) rename internal/{ => ui}/options/options_test.go (100%) diff --git a/cmd/restic/cmd_options.go b/cmd/restic/cmd_options.go index 6edcbebec..2298f0dff 100644 --- a/cmd/restic/cmd_options.go +++ b/cmd/restic/cmd_options.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/restic/restic/internal/options" + "github.com/restic/restic/internal/ui/options" "github.com/spf13/cobra" ) diff --git a/cmd/restic/global.go b/cmd/restic/global.go index 01d183e7e..676151c44 100644 --- a/cmd/restic/global.go +++ b/cmd/restic/global.go @@ -26,11 +26,11 @@ import ( "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/fs" "github.com/restic/restic/internal/limiter" - "github.com/restic/restic/internal/options" "github.com/restic/restic/internal/repository" "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/textfile" "github.com/restic/restic/internal/ui/config" + "github.com/restic/restic/internal/ui/options" "github.com/restic/restic/internal/errors" diff --git a/cmd/restic/integration_helpers_test.go b/cmd/restic/integration_helpers_test.go index 7b04becef..3020c6c3d 100644 --- a/cmd/restic/integration_helpers_test.go +++ b/cmd/restic/integration_helpers_test.go @@ -9,11 +9,11 @@ import ( "runtime" "testing" - "github.com/restic/restic/internal/options" "github.com/restic/restic/internal/repository" "github.com/restic/restic/internal/restic" rtest "github.com/restic/restic/internal/test" "github.com/restic/restic/internal/ui/config" + "github.com/restic/restic/internal/ui/options" ) type dirEntry struct { diff --git a/cmd/restic/main.go b/cmd/restic/main.go index c38e8afa5..b64f84b00 100644 --- a/cmd/restic/main.go +++ b/cmd/restic/main.go @@ -10,9 +10,9 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/restic/restic/internal/debug" - "github.com/restic/restic/internal/options" "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/ui/config" + "github.com/restic/restic/internal/ui/options" "github.com/spf13/cobra" diff --git a/internal/backend/azure/config.go b/internal/backend/azure/config.go index 15a2e5cf9..141f4f428 100644 --- a/internal/backend/azure/config.go +++ b/internal/backend/azure/config.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/restic/restic/internal/errors" - "github.com/restic/restic/internal/options" + "github.com/restic/restic/internal/ui/options" ) // Config contains all configuration necessary to connect to an azure compatible diff --git a/internal/backend/b2/config.go b/internal/backend/b2/config.go index f10e4d10d..e1023cd60 100644 --- a/internal/backend/b2/config.go +++ b/internal/backend/b2/config.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/restic/restic/internal/errors" - "github.com/restic/restic/internal/options" + "github.com/restic/restic/internal/ui/options" ) // Config contains all configuration necessary to connect to an b2 compatible diff --git a/internal/backend/gs/config.go b/internal/backend/gs/config.go index e18066ef9..988c0d1f0 100644 --- a/internal/backend/gs/config.go +++ b/internal/backend/gs/config.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/restic/restic/internal/errors" - "github.com/restic/restic/internal/options" + "github.com/restic/restic/internal/ui/options" ) // Config contains all configuration necessary to connect to a Google Cloud Storage diff --git a/internal/backend/local/config.go b/internal/backend/local/config.go index 13b7f67aa..5296b3cce 100644 --- a/internal/backend/local/config.go +++ b/internal/backend/local/config.go @@ -4,7 +4,7 @@ import ( "strings" "github.com/restic/restic/internal/errors" - "github.com/restic/restic/internal/options" + "github.com/restic/restic/internal/ui/options" ) // Config holds all information needed to open a local repository. diff --git a/internal/backend/rclone/config.go b/internal/backend/rclone/config.go index c2c5d88f9..46d89bbfc 100644 --- a/internal/backend/rclone/config.go +++ b/internal/backend/rclone/config.go @@ -4,7 +4,7 @@ import ( "strings" "github.com/restic/restic/internal/errors" - "github.com/restic/restic/internal/options" + "github.com/restic/restic/internal/ui/options" ) // Config contains all configuration necessary to start rclone. diff --git a/internal/backend/rest/config.go b/internal/backend/rest/config.go index 60c6bf92b..090819aa7 100644 --- a/internal/backend/rest/config.go +++ b/internal/backend/rest/config.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/restic/restic/internal/errors" - "github.com/restic/restic/internal/options" + "github.com/restic/restic/internal/ui/options" ) // Config contains all configuration necessary to connect to a REST server. diff --git a/internal/backend/s3/config.go b/internal/backend/s3/config.go index 1760f48c2..7f4d69bfc 100644 --- a/internal/backend/s3/config.go +++ b/internal/backend/s3/config.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/restic/restic/internal/errors" - "github.com/restic/restic/internal/options" + "github.com/restic/restic/internal/ui/options" ) // Config contains all configuration necessary to connect to an s3 compatible diff --git a/internal/backend/semaphore.go b/internal/backend/semaphore.go index 2146db2f3..abe1da580 100644 --- a/internal/backend/semaphore.go +++ b/internal/backend/semaphore.go @@ -2,8 +2,9 @@ package backend import ( "context" - "github.com/restic/restic/internal/errors" "io" + + "github.com/restic/restic/internal/errors" ) // Semaphore limits access to a restricted resource. diff --git a/internal/backend/sftp/config.go b/internal/backend/sftp/config.go index 90fe52c39..6be35ec83 100644 --- a/internal/backend/sftp/config.go +++ b/internal/backend/sftp/config.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/restic/restic/internal/errors" - "github.com/restic/restic/internal/options" + "github.com/restic/restic/internal/ui/options" ) // Config collects all information required to connect to an sftp server. diff --git a/internal/backend/swift/config.go b/internal/backend/swift/config.go index 9c152707e..e7eeec7b9 100644 --- a/internal/backend/swift/config.go +++ b/internal/backend/swift/config.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/restic/restic/internal/errors" - "github.com/restic/restic/internal/options" + "github.com/restic/restic/internal/ui/options" ) // Config contains basic configuration needed to specify swift location for a swift server diff --git a/internal/options/options.go b/internal/ui/options/options.go similarity index 100% rename from internal/options/options.go rename to internal/ui/options/options.go diff --git a/internal/options/options_test.go b/internal/ui/options/options_test.go similarity index 100% rename from internal/options/options_test.go rename to internal/ui/options/options_test.go