From 23c903074c65cf87220556e69bc6e4a1ef053964 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 24 Jul 2017 17:42:25 +0200 Subject: [PATCH] Move restic package to internal/restic --- cmd/restic/cmd_backup.go | 3 +-- cmd/restic/cmd_cat.go | 2 +- cmd/restic/cmd_check.go | 2 +- cmd/restic/cmd_dump.go | 2 +- cmd/restic/cmd_find.go | 2 +- cmd/restic/cmd_forget.go | 3 +-- cmd/restic/cmd_key.go | 2 +- cmd/restic/cmd_list.go | 2 +- cmd/restic/cmd_ls.go | 2 +- cmd/restic/cmd_migrate.go | 2 +- cmd/restic/cmd_mount.go | 3 +-- cmd/restic/cmd_prune.go | 2 +- cmd/restic/cmd_rebuild_index.go | 2 +- cmd/restic/cmd_restore.go | 2 +- cmd/restic/cmd_snapshots.go | 3 +-- cmd/restic/cmd_tag.go | 2 +- cmd/restic/cmd_unlock.go | 3 +-- cmd/restic/find.go | 2 +- cmd/restic/format.go | 2 +- cmd/restic/global.go | 3 +-- cmd/restic/integration_fuse_test.go | 2 +- cmd/restic/integration_test.go | 3 +-- cmd/restic/lock.go | 2 +- cmd/restic/main.go | 2 +- internal/archiver/archive_reader.go | 2 +- internal/archiver/archive_reader_test.go | 2 +- internal/archiver/archiver.go | 3 +-- internal/archiver/archiver_duplication_test.go | 2 +- internal/archiver/archiver_test.go | 2 +- internal/archiver/testing.go | 2 +- internal/backend/b2/b2.go | 3 +-- internal/backend/b2/b2_test.go | 2 +- internal/backend/layout.go | 2 +- internal/backend/layout_default.go | 2 +- internal/backend/layout_rest.go | 2 +- internal/backend/layout_s3legacy.go | 2 +- internal/backend/layout_test.go | 2 +- internal/backend/local/layout_test.go | 2 +- internal/backend/local/local.go | 3 +-- internal/backend/local/local_test.go | 3 +-- internal/backend/mem/mem_backend.go | 3 +-- internal/backend/mem/mem_backend_test.go | 3 +-- internal/backend/rest/rest.go | 3 +-- internal/backend/rest/rest_test.go | 3 +-- internal/backend/s3/s3.go | 3 +-- internal/backend/s3/s3_test.go | 3 +-- internal/backend/sftp/layout_test.go | 2 +- internal/backend/sftp/sftp.go | 3 +-- internal/backend/sftp/sftp_test.go | 2 +- internal/backend/swift/swift.go | 2 +- internal/backend/swift/swift_test.go | 3 +-- internal/backend/test/benchmarks.go | 2 +- internal/backend/test/suite.go | 2 +- internal/backend/test/tests.go | 2 +- internal/backend/test/tests_test.go | 2 +- internal/backend/utils.go | 2 +- internal/backend/utils_test.go | 3 +-- internal/checker/checker.go | 2 +- internal/checker/checker_test.go | 2 +- internal/checker/testing.go | 2 +- internal/fuse/blob_size_cache.go | 3 +-- internal/fuse/dir.go | 2 +- internal/fuse/file.go | 2 +- internal/fuse/file_test.go | 2 +- internal/fuse/link.go | 3 +-- internal/fuse/root.go | 2 +- internal/fuse/snapshots_dir.go | 2 +- internal/index/index.go | 2 +- internal/index/index_test.go | 2 +- internal/list/list.go | 2 +- internal/migrations/interface.go | 2 +- internal/migrations/s3_layout.go | 2 +- internal/mock/backend.go | 3 +-- internal/mock/repository.go | 2 +- internal/pack/pack.go | 3 +-- internal/pack/pack_test.go | 3 +-- internal/repository/index.go | 3 +-- internal/repository/index_test.go | 3 +-- internal/repository/key.go | 3 +-- internal/repository/master_index.go | 3 +-- internal/repository/packer_manager.go | 3 +-- internal/repository/packer_manager_test.go | 2 +- internal/repository/parallel.go | 3 +-- internal/repository/parallel_test.go | 3 +-- internal/repository/repack.go | 2 +- internal/repository/repack_test.go | 2 +- internal/repository/repository.go | 3 +-- internal/repository/repository_test.go | 2 +- internal/repository/testing.go | 2 +- internal/{ => restic}/backend.go | 0 internal/{ => restic}/backend_find.go | 0 internal/{ => restic}/backend_find_test.go | 0 internal/{ => restic}/blob.go | 0 internal/{ => restic}/blob_set.go | 0 internal/{ => restic}/blob_test.go | 0 internal/{ => restic}/buffer.go | 0 internal/{ => restic}/config.go | 0 internal/{ => restic}/config_test.go | 3 +-- internal/{ => restic}/doc.go | 0 internal/{ => restic}/file.go | 0 internal/{ => restic}/file_test.go | 0 internal/{ => restic}/find.go | 0 internal/{ => restic}/find_test.go | 3 +-- internal/{ => restic}/hardlinks_index.go | 0 internal/{ => restic}/hardlinks_index_test.go | 2 +- internal/{ => restic}/id.go | 0 internal/{ => restic}/id_int_test.go | 0 internal/{ => restic}/id_test.go | 0 internal/{ => restic}/ids.go | 0 internal/{ => restic}/ids_test.go | 0 internal/{ => restic}/idset.go | 0 internal/{ => restic}/idset_test.go | 0 internal/{ => restic}/lock.go | 0 internal/{ => restic}/lock_test.go | 2 +- internal/{ => restic}/lock_unix.go | 0 internal/{ => restic}/lock_windows.go | 0 internal/{ => restic}/node.go | 0 internal/{ => restic}/node_darwin.go | 0 internal/{ => restic}/node_freebsd.go | 0 internal/{ => restic}/node_linux.go | 0 internal/{ => restic}/node_openbsd.go | 0 internal/{ => restic}/node_test.go | 2 +- internal/{ => restic}/node_unix.go | 0 internal/{ => restic}/node_unix_test.go | 0 internal/{ => restic}/node_windows.go | 0 internal/{ => restic}/node_xattr.go | 0 internal/{ => restic}/progress.go | 0 internal/{ => restic}/progress_unix.go | 0 internal/{ => restic}/progress_unix_with_siginfo.go | 0 internal/{ => restic}/rand_reader.go | 0 internal/{ => restic}/readerat.go | 0 internal/{ => restic}/repository.go | 0 internal/{ => restic}/restorer.go | 0 internal/{ => restic}/snapshot.go | 0 internal/{ => restic}/snapshot_find.go | 0 internal/{ => restic}/snapshot_policy.go | 0 internal/{ => restic}/snapshot_policy_test.go | 2 +- internal/{ => restic}/snapshot_test.go | 2 +- internal/{ => restic}/tag_list.go | 0 internal/{ => restic}/testdata/filter_snapshots_0 | 0 internal/{ => restic}/testdata/filter_snapshots_1 | 0 internal/{ => restic}/testdata/filter_snapshots_2 | 0 internal/{ => restic}/testdata/filter_snapshots_3 | 0 internal/{ => restic}/testdata/filter_snapshots_4 | 0 internal/{ => restic}/testdata/filter_snapshots_5 | 0 internal/{ => restic}/testdata/filter_snapshots_6 | 0 internal/{ => restic}/testdata/filter_snapshots_7 | 0 internal/{ => restic}/testdata/filter_snapshots_8 | 0 internal/{ => restic}/testdata/filter_snapshots_9 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_0 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_1 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_10 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_11 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_12 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_13 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_14 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_15 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_16 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_17 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_18 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_19 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_2 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_20 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_3 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_4 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_5 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_6 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_7 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_8 | 0 internal/{ => restic}/testdata/policy_keep_snapshots_9 | 0 internal/{ => restic}/testdata/used_blobs_snapshot0 | 0 internal/{ => restic}/testdata/used_blobs_snapshot1 | 0 internal/{ => restic}/testdata/used_blobs_snapshot2 | 0 internal/{ => restic}/testing.go | 0 internal/{ => restic}/testing_test.go | 2 +- internal/{ => restic}/tree.go | 0 internal/{ => restic}/tree_test.go | 2 +- internal/walk/walk.go | 3 +-- internal/walk/walk_test.go | 2 +- 179 files changed, 100 insertions(+), 136 deletions(-) rename internal/{ => restic}/backend.go (100%) rename internal/{ => restic}/backend_find.go (100%) rename internal/{ => restic}/backend_find_test.go (100%) rename internal/{ => restic}/blob.go (100%) rename internal/{ => restic}/blob_set.go (100%) rename internal/{ => restic}/blob_test.go (100%) rename internal/{ => restic}/buffer.go (100%) rename internal/{ => restic}/config.go (100%) rename internal/{ => restic}/config_test.go (96%) rename internal/{ => restic}/doc.go (100%) rename internal/{ => restic}/file.go (100%) rename internal/{ => restic}/file_test.go (100%) rename internal/{ => restic}/find.go (100%) rename internal/{ => restic}/find_test.go (98%) rename internal/{ => restic}/hardlinks_index.go (100%) rename internal/{ => restic}/hardlinks_index_test.go (93%) rename internal/{ => restic}/id.go (100%) rename internal/{ => restic}/id_int_test.go (100%) rename internal/{ => restic}/id_test.go (100%) rename internal/{ => restic}/ids.go (100%) rename internal/{ => restic}/ids_test.go (100%) rename internal/{ => restic}/idset.go (100%) rename internal/{ => restic}/idset_test.go (100%) rename internal/{ => restic}/lock.go (100%) rename internal/{ => restic}/lock_test.go (99%) rename internal/{ => restic}/lock_unix.go (100%) rename internal/{ => restic}/lock_windows.go (100%) rename internal/{ => restic}/node.go (100%) rename internal/{ => restic}/node_darwin.go (100%) rename internal/{ => restic}/node_freebsd.go (100%) rename internal/{ => restic}/node_linux.go (100%) rename internal/{ => restic}/node_openbsd.go (100%) rename internal/{ => restic}/node_test.go (99%) rename internal/{ => restic}/node_unix.go (100%) rename internal/{ => restic}/node_unix_test.go (100%) rename internal/{ => restic}/node_windows.go (100%) rename internal/{ => restic}/node_xattr.go (100%) rename internal/{ => restic}/progress.go (100%) rename internal/{ => restic}/progress_unix.go (100%) rename internal/{ => restic}/progress_unix_with_siginfo.go (100%) rename internal/{ => restic}/rand_reader.go (100%) rename internal/{ => restic}/readerat.go (100%) rename internal/{ => restic}/repository.go (100%) rename internal/{ => restic}/restorer.go (100%) rename internal/{ => restic}/snapshot.go (100%) rename internal/{ => restic}/snapshot_find.go (100%) rename internal/{ => restic}/snapshot_policy.go (100%) rename internal/{ => restic}/snapshot_policy_test.go (99%) rename internal/{ => restic}/snapshot_test.go (83%) rename internal/{ => restic}/tag_list.go (100%) rename internal/{ => restic}/testdata/filter_snapshots_0 (100%) rename internal/{ => restic}/testdata/filter_snapshots_1 (100%) rename internal/{ => restic}/testdata/filter_snapshots_2 (100%) rename internal/{ => restic}/testdata/filter_snapshots_3 (100%) rename internal/{ => restic}/testdata/filter_snapshots_4 (100%) rename internal/{ => restic}/testdata/filter_snapshots_5 (100%) rename internal/{ => restic}/testdata/filter_snapshots_6 (100%) rename internal/{ => restic}/testdata/filter_snapshots_7 (100%) rename internal/{ => restic}/testdata/filter_snapshots_8 (100%) rename internal/{ => restic}/testdata/filter_snapshots_9 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_0 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_1 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_10 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_11 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_12 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_13 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_14 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_15 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_16 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_17 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_18 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_19 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_2 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_20 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_3 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_4 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_5 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_6 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_7 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_8 (100%) rename internal/{ => restic}/testdata/policy_keep_snapshots_9 (100%) rename internal/{ => restic}/testdata/used_blobs_snapshot0 (100%) rename internal/{ => restic}/testdata/used_blobs_snapshot1 (100%) rename internal/{ => restic}/testdata/used_blobs_snapshot2 (100%) rename internal/{ => restic}/testing.go (100%) rename internal/{ => restic}/testing_test.go (96%) rename internal/{ => restic}/tree.go (100%) rename internal/{ => restic}/tree_test.go (98%) diff --git a/cmd/restic/cmd_backup.go b/cmd/restic/cmd_backup.go index 1e65e8fd3..931988176 100644 --- a/cmd/restic/cmd_backup.go +++ b/cmd/restic/cmd_backup.go @@ -10,8 +10,6 @@ import ( "strings" "time" - "github.com/restic/restic/internal" - "github.com/spf13/cobra" "github.com/restic/restic/internal/archiver" @@ -19,6 +17,7 @@ import ( "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/filter" "github.com/restic/restic/internal/fs" + "github.com/restic/restic/internal/restic" ) var cmdBackup = &cobra.Command{ diff --git a/cmd/restic/cmd_cat.go b/cmd/restic/cmd_cat.go index 42933d16b..a7f15e75b 100644 --- a/cmd/restic/cmd_cat.go +++ b/cmd/restic/cmd_cat.go @@ -8,10 +8,10 @@ import ( "github.com/spf13/cobra" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/backend" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" ) var cmdCat = &cobra.Command{ diff --git a/cmd/restic/cmd_check.go b/cmd/restic/cmd_check.go index d547b6ed9..c0575ade3 100644 --- a/cmd/restic/cmd_check.go +++ b/cmd/restic/cmd_check.go @@ -8,9 +8,9 @@ import ( "github.com/spf13/cobra" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/checker" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" ) var cmdCheck = &cobra.Command{ diff --git a/cmd/restic/cmd_dump.go b/cmd/restic/cmd_dump.go index 2b11d6a8a..56d5426b6 100644 --- a/cmd/restic/cmd_dump.go +++ b/cmd/restic/cmd_dump.go @@ -11,10 +11,10 @@ import ( "github.com/spf13/cobra" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/pack" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/worker" ) diff --git a/cmd/restic/cmd_find.go b/cmd/restic/cmd_find.go index d278f7238..3b4860eb4 100644 --- a/cmd/restic/cmd_find.go +++ b/cmd/restic/cmd_find.go @@ -9,9 +9,9 @@ import ( "github.com/spf13/cobra" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" ) var cmdFind = &cobra.Command{ diff --git a/cmd/restic/cmd_forget.go b/cmd/restic/cmd_forget.go index 1c70929ea..68cfe5926 100644 --- a/cmd/restic/cmd_forget.go +++ b/cmd/restic/cmd_forget.go @@ -6,8 +6,7 @@ import ( "sort" "strings" - "github.com/restic/restic/internal" - + "github.com/restic/restic/internal/restic" "github.com/spf13/cobra" ) diff --git a/cmd/restic/cmd_key.go b/cmd/restic/cmd_key.go index af8f53d78..fe8272457 100644 --- a/cmd/restic/cmd_key.go +++ b/cmd/restic/cmd_key.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" "github.com/spf13/cobra" ) diff --git a/cmd/restic/cmd_list.go b/cmd/restic/cmd_list.go index 4e8ea6821..99cad1a98 100644 --- a/cmd/restic/cmd_list.go +++ b/cmd/restic/cmd_list.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/index" + "github.com/restic/restic/internal/restic" "github.com/spf13/cobra" ) diff --git a/cmd/restic/cmd_ls.go b/cmd/restic/cmd_ls.go index 33bba2ba9..d6e8fc9e2 100644 --- a/cmd/restic/cmd_ls.go +++ b/cmd/restic/cmd_ls.go @@ -6,9 +6,9 @@ import ( "github.com/spf13/cobra" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" ) var cmdLs = &cobra.Command{ diff --git a/cmd/restic/cmd_migrate.go b/cmd/restic/cmd_migrate.go index bf95c535a..010f833db 100644 --- a/cmd/restic/cmd_migrate.go +++ b/cmd/restic/cmd_migrate.go @@ -1,8 +1,8 @@ package main import ( - "github.com/restic/restic/internal" "github.com/restic/restic/internal/migrations" + "github.com/restic/restic/internal/restic" "github.com/spf13/cobra" ) diff --git a/cmd/restic/cmd_mount.go b/cmd/restic/cmd_mount.go index 6337f4f6f..14db117ca 100644 --- a/cmd/restic/cmd_mount.go +++ b/cmd/restic/cmd_mount.go @@ -7,12 +7,11 @@ import ( "context" "os" - "github.com/restic/restic/internal" - "github.com/spf13/cobra" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" resticfs "github.com/restic/restic/internal/fs" "github.com/restic/restic/internal/fuse" diff --git a/cmd/restic/cmd_prune.go b/cmd/restic/cmd_prune.go index 96dc4276a..c40bdc7e2 100644 --- a/cmd/restic/cmd_prune.go +++ b/cmd/restic/cmd_prune.go @@ -4,11 +4,11 @@ import ( "fmt" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/index" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" "github.com/spf13/cobra" ) diff --git a/cmd/restic/cmd_rebuild_index.go b/cmd/restic/cmd_rebuild_index.go index 4c086c862..ed335b271 100644 --- a/cmd/restic/cmd_rebuild_index.go +++ b/cmd/restic/cmd_rebuild_index.go @@ -3,8 +3,8 @@ package main import ( "context" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/index" + "github.com/restic/restic/internal/restic" "github.com/spf13/cobra" ) diff --git a/cmd/restic/cmd_restore.go b/cmd/restic/cmd_restore.go index db92557ae..ca0f6d1e6 100644 --- a/cmd/restic/cmd_restore.go +++ b/cmd/restic/cmd_restore.go @@ -1,10 +1,10 @@ package main import ( - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/filter" + "github.com/restic/restic/internal/restic" "github.com/spf13/cobra" ) diff --git a/cmd/restic/cmd_snapshots.go b/cmd/restic/cmd_snapshots.go index d7f8f0657..5921ec13d 100644 --- a/cmd/restic/cmd_snapshots.go +++ b/cmd/restic/cmd_snapshots.go @@ -7,9 +7,8 @@ import ( "io" "sort" + "github.com/restic/restic/internal/restic" "github.com/spf13/cobra" - - "github.com/restic/restic/internal" ) var cmdSnapshots = &cobra.Command{ diff --git a/cmd/restic/cmd_tag.go b/cmd/restic/cmd_tag.go index f67ce2a8c..33c7e5781 100644 --- a/cmd/restic/cmd_tag.go +++ b/cmd/restic/cmd_tag.go @@ -5,10 +5,10 @@ import ( "github.com/spf13/cobra" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" ) var cmdTag = &cobra.Command{ diff --git a/cmd/restic/cmd_unlock.go b/cmd/restic/cmd_unlock.go index 1f8156c9e..26bb0fd6a 100644 --- a/cmd/restic/cmd_unlock.go +++ b/cmd/restic/cmd_unlock.go @@ -3,8 +3,7 @@ package main import ( "context" - "github.com/restic/restic/internal" - + "github.com/restic/restic/internal/restic" "github.com/spf13/cobra" ) diff --git a/cmd/restic/find.go b/cmd/restic/find.go index 25db96541..8b227fa55 100644 --- a/cmd/restic/find.go +++ b/cmd/restic/find.go @@ -3,8 +3,8 @@ package main import ( "context" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" ) // FindFilteredSnapshots yields Snapshots, either given explicitly by `snapshotIDs` or filtered from the list of all snapshots. diff --git a/cmd/restic/format.go b/cmd/restic/format.go index 835a6fed0..5a1f2ba8c 100644 --- a/cmd/restic/format.go +++ b/cmd/restic/format.go @@ -6,7 +6,7 @@ import ( "path/filepath" "time" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" ) func formatBytes(c uint64) string { diff --git a/cmd/restic/global.go b/cmd/restic/global.go index c4e051f91..3eabefa29 100644 --- a/cmd/restic/global.go +++ b/cmd/restic/global.go @@ -10,8 +10,6 @@ import ( "strings" "syscall" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/backend/b2" "github.com/restic/restic/internal/backend/local" "github.com/restic/restic/internal/backend/location" @@ -22,6 +20,7 @@ import ( "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/options" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/errors" diff --git a/cmd/restic/integration_fuse_test.go b/cmd/restic/integration_fuse_test.go index 323a8a447..88cd167d9 100644 --- a/cmd/restic/integration_fuse_test.go +++ b/cmd/restic/integration_fuse_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/cmd/restic/integration_test.go b/cmd/restic/integration_test.go index 1604f0908..7ae2d4e8a 100644 --- a/cmd/restic/integration_test.go +++ b/cmd/restic/integration_test.go @@ -17,9 +17,8 @@ import ( "testing" "time" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/filter" diff --git a/cmd/restic/lock.go b/cmd/restic/lock.go index 08ce0ce73..c147a9cb5 100644 --- a/cmd/restic/lock.go +++ b/cmd/restic/lock.go @@ -7,9 +7,9 @@ import ( "sync" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" ) var globalLocks struct { diff --git a/cmd/restic/main.go b/cmd/restic/main.go index 06af4877c..b53fc986c 100644 --- a/cmd/restic/main.go +++ b/cmd/restic/main.go @@ -8,9 +8,9 @@ import ( "os" "runtime" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/options" + "github.com/restic/restic/internal/restic" "github.com/spf13/cobra" diff --git a/internal/archiver/archive_reader.go b/internal/archiver/archive_reader.go index ced4a2540..eaf422aab 100644 --- a/internal/archiver/archive_reader.go +++ b/internal/archiver/archive_reader.go @@ -5,8 +5,8 @@ import ( "io" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/errors" diff --git a/internal/archiver/archive_reader_test.go b/internal/archiver/archive_reader_test.go index 8db0aa64e..56e5fec5f 100644 --- a/internal/archiver/archive_reader_test.go +++ b/internal/archiver/archive_reader_test.go @@ -8,9 +8,9 @@ import ( "math/rand" "testing" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/checker" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" ) func loadBlob(t *testing.T, repo restic.Repository, id restic.ID, buf []byte) int { diff --git a/internal/archiver/archiver.go b/internal/archiver/archiver.go index d3430aef2..0ed66c07f 100644 --- a/internal/archiver/archiver.go +++ b/internal/archiver/archiver.go @@ -11,9 +11,8 @@ import ( "sync" "time" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/walk" "github.com/restic/restic/internal/debug" diff --git a/internal/archiver/archiver_duplication_test.go b/internal/archiver/archiver_duplication_test.go index bcc875529..2ac2c1308 100644 --- a/internal/archiver/archiver_duplication_test.go +++ b/internal/archiver/archiver_duplication_test.go @@ -10,8 +10,8 @@ import ( "time" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/archiver" "github.com/restic/restic/internal/mock" "github.com/restic/restic/internal/repository" diff --git a/internal/archiver/archiver_test.go b/internal/archiver/archiver_test.go index 082b0ca26..2961d403c 100644 --- a/internal/archiver/archiver_test.go +++ b/internal/archiver/archiver_test.go @@ -7,11 +7,11 @@ import ( "testing" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/archiver" "github.com/restic/restic/internal/checker" "github.com/restic/restic/internal/crypto" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" "github.com/restic/restic/internal/errors" diff --git a/internal/archiver/testing.go b/internal/archiver/testing.go index b5ea08b0c..37abea83f 100644 --- a/internal/archiver/testing.go +++ b/internal/archiver/testing.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" ) // TestSnapshot creates a new snapshot of path. diff --git a/internal/backend/b2/b2.go b/internal/backend/b2/b2.go index a67881ecd..94a13222b 100644 --- a/internal/backend/b2/b2.go +++ b/internal/backend/b2/b2.go @@ -6,11 +6,10 @@ import ( "path" "strings" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/backend" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/kurin/blazer/b2" ) diff --git a/internal/backend/b2/b2_test.go b/internal/backend/b2/b2_test.go index 7707d2aa3..7fe90b0a0 100644 --- a/internal/backend/b2/b2_test.go +++ b/internal/backend/b2/b2_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/backend/b2" "github.com/restic/restic/internal/backend/test" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/backend/layout.go b/internal/backend/layout.go index dfe413576..90c38a5c4 100644 --- a/internal/backend/layout.go +++ b/internal/backend/layout.go @@ -6,10 +6,10 @@ import ( "path/filepath" "regexp" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/fs" + "github.com/restic/restic/internal/restic" ) // Layout computes paths for file name storage. diff --git a/internal/backend/layout_default.go b/internal/backend/layout_default.go index 3d9ba5e65..d4a433241 100644 --- a/internal/backend/layout_default.go +++ b/internal/backend/layout_default.go @@ -3,7 +3,7 @@ package backend import ( "encoding/hex" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" ) // DefaultLayout implements the default layout for local and sftp backends, as diff --git a/internal/backend/layout_rest.go b/internal/backend/layout_rest.go index dd903913d..231e04cf6 100644 --- a/internal/backend/layout_rest.go +++ b/internal/backend/layout_rest.go @@ -1,6 +1,6 @@ package backend -import "github.com/restic/restic/internal" +import "github.com/restic/restic/internal/restic" // RESTLayout implements the default layout for the REST protocol. type RESTLayout struct { diff --git a/internal/backend/layout_s3legacy.go b/internal/backend/layout_s3legacy.go index 5d759d893..fae5ab451 100644 --- a/internal/backend/layout_s3legacy.go +++ b/internal/backend/layout_s3legacy.go @@ -1,6 +1,6 @@ package backend -import "github.com/restic/restic/internal" +import "github.com/restic/restic/internal/restic" // S3LegacyLayout implements the old layout used for s3 cloud storage backends, as // described in the Design document. diff --git a/internal/backend/layout_test.go b/internal/backend/layout_test.go index d5fd3e9e7..35aa4bcce 100644 --- a/internal/backend/layout_test.go +++ b/internal/backend/layout_test.go @@ -8,7 +8,7 @@ import ( "sort" "testing" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/backend/local/layout_test.go b/internal/backend/local/layout_test.go index 23b3b0702..1b2e342c7 100644 --- a/internal/backend/local/layout_test.go +++ b/internal/backend/local/layout_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/backend/local/local.go b/internal/backend/local/local.go index 34d1d3441..27be5a2b7 100644 --- a/internal/backend/local/local.go +++ b/internal/backend/local/local.go @@ -6,9 +6,8 @@ import ( "os" "path/filepath" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/backend" "github.com/restic/restic/internal/debug" diff --git a/internal/backend/local/local_test.go b/internal/backend/local/local_test.go index b032f9f90..a296fff5e 100644 --- a/internal/backend/local/local_test.go +++ b/internal/backend/local/local_test.go @@ -4,10 +4,9 @@ import ( "io/ioutil" "testing" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/backend/local" "github.com/restic/restic/internal/backend/test" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/backend/mem/mem_backend.go b/internal/backend/mem/mem_backend.go index 4e5e92a84..9e7de51d5 100644 --- a/internal/backend/mem/mem_backend.go +++ b/internal/backend/mem/mem_backend.go @@ -7,9 +7,8 @@ import ( "io/ioutil" "sync" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/debug" ) diff --git a/internal/backend/mem/mem_backend_test.go b/internal/backend/mem/mem_backend_test.go index 91741f3ea..15e66ac83 100644 --- a/internal/backend/mem/mem_backend_test.go +++ b/internal/backend/mem/mem_backend_test.go @@ -4,9 +4,8 @@ import ( "context" "testing" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/backend/mem" "github.com/restic/restic/internal/backend/test" diff --git a/internal/backend/rest/rest.go b/internal/backend/rest/rest.go index a8d1a7f17..d0e0868af 100644 --- a/internal/backend/rest/rest.go +++ b/internal/backend/rest/rest.go @@ -11,12 +11,11 @@ import ( "path" "strings" - "github.com/restic/restic/internal" - "golang.org/x/net/context/ctxhttp" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/backend" ) diff --git a/internal/backend/rest/rest_test.go b/internal/backend/rest/rest_test.go index b5e0dd39b..314a5c32b 100644 --- a/internal/backend/rest/rest_test.go +++ b/internal/backend/rest/rest_test.go @@ -10,10 +10,9 @@ import ( "testing" "time" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/backend/rest" "github.com/restic/restic/internal/backend/test" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/backend/s3/s3.go b/internal/backend/s3/s3.go index 6017c1736..12557a16c 100644 --- a/internal/backend/s3/s3.go +++ b/internal/backend/s3/s3.go @@ -10,10 +10,9 @@ import ( "strings" "time" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/backend" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/minio/minio-go" "github.com/minio/minio-go/pkg/credentials" diff --git a/internal/backend/s3/s3_test.go b/internal/backend/s3/s3_test.go index a1c522bb9..19927b6ac 100644 --- a/internal/backend/s3/s3_test.go +++ b/internal/backend/s3/s3_test.go @@ -14,10 +14,9 @@ import ( "testing" "time" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/backend/s3" "github.com/restic/restic/internal/backend/test" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/backend/sftp/layout_test.go b/internal/backend/sftp/layout_test.go index f993fe5bd..1aa4da5b9 100644 --- a/internal/backend/sftp/layout_test.go +++ b/internal/backend/sftp/layout_test.go @@ -6,8 +6,8 @@ import ( "path/filepath" "testing" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/backend/sftp" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/backend/sftp/sftp.go b/internal/backend/sftp/sftp.go index d646b5b29..a85b9b315 100644 --- a/internal/backend/sftp/sftp.go +++ b/internal/backend/sftp/sftp.go @@ -11,9 +11,8 @@ import ( "strings" "time" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/backend" "github.com/restic/restic/internal/debug" diff --git a/internal/backend/sftp/sftp_test.go b/internal/backend/sftp/sftp_test.go index c2f5f84e5..8449c6daa 100644 --- a/internal/backend/sftp/sftp_test.go +++ b/internal/backend/sftp/sftp_test.go @@ -8,10 +8,10 @@ import ( "strings" "testing" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/backend/sftp" "github.com/restic/restic/internal/backend/test" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/backend/swift/swift.go b/internal/backend/swift/swift.go index a149e2b85..d66b347ae 100644 --- a/internal/backend/swift/swift.go +++ b/internal/backend/swift/swift.go @@ -10,10 +10,10 @@ import ( "strings" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/backend" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/ncw/swift" ) diff --git a/internal/backend/swift/swift_test.go b/internal/backend/swift/swift_test.go index cfe1ece85..515392068 100644 --- a/internal/backend/swift/swift_test.go +++ b/internal/backend/swift/swift_test.go @@ -7,9 +7,8 @@ import ( "testing" "time" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" "github.com/restic/restic/internal/backend/swift" diff --git a/internal/backend/test/benchmarks.go b/internal/backend/test/benchmarks.go index 3b492390f..f7d06db3c 100644 --- a/internal/backend/test/benchmarks.go +++ b/internal/backend/test/benchmarks.go @@ -6,7 +6,7 @@ import ( "io" "testing" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/test" ) diff --git a/internal/backend/test/suite.go b/internal/backend/test/suite.go index a31f08fe2..fa1d99021 100644 --- a/internal/backend/test/suite.go +++ b/internal/backend/test/suite.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/test" ) diff --git a/internal/backend/test/tests.go b/internal/backend/test/tests.go index a4a9c53ed..0816c0b99 100644 --- a/internal/backend/test/tests.go +++ b/internal/backend/test/tests.go @@ -14,8 +14,8 @@ import ( "testing" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/test" diff --git a/internal/backend/test/tests_test.go b/internal/backend/test/tests_test.go index d28f54402..de1663cbc 100644 --- a/internal/backend/test/tests_test.go +++ b/internal/backend/test/tests_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/backend/mem" "github.com/restic/restic/internal/backend/test" diff --git a/internal/backend/utils.go b/internal/backend/utils.go index 3ce011115..6d1871e63 100644 --- a/internal/backend/utils.go +++ b/internal/backend/utils.go @@ -5,7 +5,7 @@ import ( "io" "io/ioutil" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" ) // LoadAll reads all data stored in the backend for the handle. diff --git a/internal/backend/utils_test.go b/internal/backend/utils_test.go index c2d9e2f33..09415f5e9 100644 --- a/internal/backend/utils_test.go +++ b/internal/backend/utils_test.go @@ -6,10 +6,9 @@ import ( "math/rand" "testing" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/backend" "github.com/restic/restic/internal/backend/mem" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index e11b846e8..e995634ed 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -11,8 +11,8 @@ import ( "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/fs" "github.com/restic/restic/internal/hashing" + "github.com/restic/restic/internal/restic" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/pack" "github.com/restic/restic/internal/repository" diff --git a/internal/checker/checker_test.go b/internal/checker/checker_test.go index 3e247bfee..20be752be 100644 --- a/internal/checker/checker_test.go +++ b/internal/checker/checker_test.go @@ -8,10 +8,10 @@ import ( "sort" "testing" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/archiver" "github.com/restic/restic/internal/checker" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/test" ) diff --git a/internal/checker/testing.go b/internal/checker/testing.go index 5e34ddb5f..4a7bf48d2 100644 --- a/internal/checker/testing.go +++ b/internal/checker/testing.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" ) // TestCheckRepo runs the checker on repo. diff --git a/internal/fuse/blob_size_cache.go b/internal/fuse/blob_size_cache.go index 2eee45069..4fbcaeba9 100644 --- a/internal/fuse/blob_size_cache.go +++ b/internal/fuse/blob_size_cache.go @@ -4,8 +4,7 @@ package fuse import ( - "github.com/restic/restic/internal" - + "github.com/restic/restic/internal/restic" "golang.org/x/net/context" ) diff --git a/internal/fuse/dir.go b/internal/fuse/dir.go index 424ff3d3a..f26f439c9 100644 --- a/internal/fuse/dir.go +++ b/internal/fuse/dir.go @@ -10,8 +10,8 @@ import ( "bazil.org/fuse/fs" "golang.org/x/net/context" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" + "github.com/restic/restic/internal/restic" ) // Statically ensure that *dir implement those interface diff --git a/internal/fuse/file.go b/internal/fuse/file.go index 449904276..642245cbc 100644 --- a/internal/fuse/file.go +++ b/internal/fuse/file.go @@ -5,8 +5,8 @@ package fuse import ( "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" "bazil.org/fuse" diff --git a/internal/fuse/file_test.go b/internal/fuse/file_test.go index f85844eac..d8aae46de 100644 --- a/internal/fuse/file_test.go +++ b/internal/fuse/file_test.go @@ -12,11 +12,11 @@ import ( "golang.org/x/net/context" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" "bazil.org/fuse" "bazil.org/fuse/fs" - "github.com/restic/restic/internal" . "github.com/restic/restic/internal/test" ) diff --git a/internal/fuse/link.go b/internal/fuse/link.go index bc60634d6..760a332dd 100644 --- a/internal/fuse/link.go +++ b/internal/fuse/link.go @@ -4,10 +4,9 @@ package fuse import ( - "github.com/restic/restic/internal" - "bazil.org/fuse" "bazil.org/fuse/fs" + "github.com/restic/restic/internal/restic" "golang.org/x/net/context" ) diff --git a/internal/fuse/root.go b/internal/fuse/root.go index e2b1c5c21..527b61816 100644 --- a/internal/fuse/root.go +++ b/internal/fuse/root.go @@ -4,8 +4,8 @@ package fuse import ( - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" + "github.com/restic/restic/internal/restic" "golang.org/x/net/context" diff --git a/internal/fuse/snapshots_dir.go b/internal/fuse/snapshots_dir.go index 2737f18b2..9884a42c0 100644 --- a/internal/fuse/snapshots_dir.go +++ b/internal/fuse/snapshots_dir.go @@ -8,8 +8,8 @@ import ( "os" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" + "github.com/restic/restic/internal/restic" "golang.org/x/net/context" diff --git a/internal/index/index.go b/internal/index/index.go index 0c60a956c..4c9ebeac3 100644 --- a/internal/index/index.go +++ b/internal/index/index.go @@ -6,10 +6,10 @@ import ( "fmt" "os" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/list" "github.com/restic/restic/internal/pack" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/worker" "github.com/restic/restic/internal/errors" diff --git a/internal/index/index_test.go b/internal/index/index_test.go index 35c5eea12..28829afe9 100644 --- a/internal/index/index_test.go +++ b/internal/index/index_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/checker" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/test" ) diff --git a/internal/list/list.go b/internal/list/list.go index 6a979c669..04916b906 100644 --- a/internal/list/list.go +++ b/internal/list/list.go @@ -3,7 +3,7 @@ package list import ( "context" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/worker" ) diff --git a/internal/migrations/interface.go b/internal/migrations/interface.go index a679a3929..9d9eedba1 100644 --- a/internal/migrations/interface.go +++ b/internal/migrations/interface.go @@ -3,7 +3,7 @@ package migrations import ( "context" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" ) // Migration implements a data migration. diff --git a/internal/migrations/s3_layout.go b/internal/migrations/s3_layout.go index d54cd0e66..3d27f0d83 100644 --- a/internal/migrations/s3_layout.go +++ b/internal/migrations/s3_layout.go @@ -6,11 +6,11 @@ import ( "os" "path" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/backend" "github.com/restic/restic/internal/backend/s3" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" ) func init() { diff --git a/internal/mock/backend.go b/internal/mock/backend.go index 9c252778f..b011131c4 100644 --- a/internal/mock/backend.go +++ b/internal/mock/backend.go @@ -4,9 +4,8 @@ import ( "context" "io" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" ) // Backend implements a mock backend. diff --git a/internal/mock/repository.go b/internal/mock/repository.go index 5ecc563dc..a6a68988a 100644 --- a/internal/mock/repository.go +++ b/internal/mock/repository.go @@ -1,8 +1,8 @@ package mock import ( - "github.com/restic/restic/internal" "github.com/restic/restic/internal/crypto" + "github.com/restic/restic/internal/restic" ) // Repository implements a mock Repository. diff --git a/internal/pack/pack.go b/internal/pack/pack.go index 46b0e68ff..292f9dcb0 100644 --- a/internal/pack/pack.go +++ b/internal/pack/pack.go @@ -7,10 +7,9 @@ import ( "io" "sync" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/crypto" ) diff --git a/internal/pack/pack_test.go b/internal/pack/pack_test.go index 882a6a75d..fc1e7ae1a 100644 --- a/internal/pack/pack_test.go +++ b/internal/pack/pack_test.go @@ -10,11 +10,10 @@ import ( "io" "testing" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/backend/mem" "github.com/restic/restic/internal/crypto" "github.com/restic/restic/internal/pack" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/repository/index.go b/internal/repository/index.go index ff4adbe5c..62d922fce 100644 --- a/internal/repository/index.go +++ b/internal/repository/index.go @@ -7,9 +7,8 @@ import ( "sync" "time" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/debug" ) diff --git a/internal/repository/index_test.go b/internal/repository/index_test.go index 3736de3bc..4cd315c66 100644 --- a/internal/repository/index_test.go +++ b/internal/repository/index_test.go @@ -4,9 +4,8 @@ import ( "bytes" "testing" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/repository/key.go b/internal/repository/key.go index 3dc14099f..e92115696 100644 --- a/internal/repository/key.go +++ b/internal/repository/key.go @@ -9,9 +9,8 @@ import ( "os/user" "time" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/backend" "github.com/restic/restic/internal/crypto" diff --git a/internal/repository/master_index.go b/internal/repository/master_index.go index b6ddb8bf5..0902dcfac 100644 --- a/internal/repository/master_index.go +++ b/internal/repository/master_index.go @@ -4,9 +4,8 @@ import ( "context" "sync" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/debug" ) diff --git a/internal/repository/packer_manager.go b/internal/repository/packer_manager.go index 4d6087fba..0955e49f0 100644 --- a/internal/repository/packer_manager.go +++ b/internal/repository/packer_manager.go @@ -7,10 +7,9 @@ import ( "os" "sync" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/hashing" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/crypto" "github.com/restic/restic/internal/debug" diff --git a/internal/repository/packer_manager_test.go b/internal/repository/packer_manager_test.go index fb7b94247..b16e21c95 100644 --- a/internal/repository/packer_manager_test.go +++ b/internal/repository/packer_manager_test.go @@ -7,11 +7,11 @@ import ( "os" "testing" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/backend/mem" "github.com/restic/restic/internal/crypto" "github.com/restic/restic/internal/fs" "github.com/restic/restic/internal/mock" + "github.com/restic/restic/internal/restic" ) type randReader struct { diff --git a/internal/repository/parallel.go b/internal/repository/parallel.go index 46f6880ae..466b255eb 100644 --- a/internal/repository/parallel.go +++ b/internal/repository/parallel.go @@ -4,9 +4,8 @@ import ( "context" "sync" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/debug" + "github.com/restic/restic/internal/restic" ) // ParallelWorkFunc gets one file ID to work on. If an error is returned, diff --git a/internal/repository/parallel_test.go b/internal/repository/parallel_test.go index 09ba2b01f..a7ebdb5e0 100644 --- a/internal/repository/parallel_test.go +++ b/internal/repository/parallel_test.go @@ -6,9 +6,8 @@ import ( "testing" "time" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/repository" . "github.com/restic/restic/internal/test" diff --git a/internal/repository/repack.go b/internal/repository/repack.go index 66a03ba00..e11aae4dd 100644 --- a/internal/repository/repack.go +++ b/internal/repository/repack.go @@ -5,11 +5,11 @@ import ( "crypto/sha256" "io" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/fs" "github.com/restic/restic/internal/hashing" "github.com/restic/restic/internal/pack" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/errors" ) diff --git a/internal/repository/repack_test.go b/internal/repository/repack_test.go index dbd8fad70..2f265150d 100644 --- a/internal/repository/repack_test.go +++ b/internal/repository/repack_test.go @@ -6,9 +6,9 @@ import ( "math/rand" "testing" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/index" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" ) func randomSize(min, max int) int { diff --git a/internal/repository/repository.go b/internal/repository/repository.go index 5c1b8ce69..d09ddd181 100644 --- a/internal/repository/repository.go +++ b/internal/repository/repository.go @@ -7,9 +7,8 @@ import ( "fmt" "os" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/errors" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/backend" "github.com/restic/restic/internal/crypto" diff --git a/internal/repository/repository_test.go b/internal/repository/repository_test.go index 7939dd249..7211058b0 100644 --- a/internal/repository/repository_test.go +++ b/internal/repository/repository_test.go @@ -10,9 +10,9 @@ import ( "testing" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/archiver" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/repository/testing.go b/internal/repository/testing.go index 8a98b679f..903971138 100644 --- a/internal/repository/testing.go +++ b/internal/repository/testing.go @@ -5,10 +5,10 @@ import ( "os" "testing" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/backend/local" "github.com/restic/restic/internal/backend/mem" "github.com/restic/restic/internal/crypto" + "github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/test" "github.com/restic/chunker" diff --git a/internal/backend.go b/internal/restic/backend.go similarity index 100% rename from internal/backend.go rename to internal/restic/backend.go diff --git a/internal/backend_find.go b/internal/restic/backend_find.go similarity index 100% rename from internal/backend_find.go rename to internal/restic/backend_find.go diff --git a/internal/backend_find_test.go b/internal/restic/backend_find_test.go similarity index 100% rename from internal/backend_find_test.go rename to internal/restic/backend_find_test.go diff --git a/internal/blob.go b/internal/restic/blob.go similarity index 100% rename from internal/blob.go rename to internal/restic/blob.go diff --git a/internal/blob_set.go b/internal/restic/blob_set.go similarity index 100% rename from internal/blob_set.go rename to internal/restic/blob_set.go diff --git a/internal/blob_test.go b/internal/restic/blob_test.go similarity index 100% rename from internal/blob_test.go rename to internal/restic/blob_test.go diff --git a/internal/buffer.go b/internal/restic/buffer.go similarity index 100% rename from internal/buffer.go rename to internal/restic/buffer.go diff --git a/internal/config.go b/internal/restic/config.go similarity index 100% rename from internal/config.go rename to internal/restic/config.go diff --git a/internal/config_test.go b/internal/restic/config_test.go similarity index 96% rename from internal/config_test.go rename to internal/restic/config_test.go index dcb46619f..db06b23f5 100644 --- a/internal/config_test.go +++ b/internal/restic/config_test.go @@ -4,8 +4,7 @@ import ( "context" "testing" - "github.com/restic/restic/internal" - + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/doc.go b/internal/restic/doc.go similarity index 100% rename from internal/doc.go rename to internal/restic/doc.go diff --git a/internal/file.go b/internal/restic/file.go similarity index 100% rename from internal/file.go rename to internal/restic/file.go diff --git a/internal/file_test.go b/internal/restic/file_test.go similarity index 100% rename from internal/file_test.go rename to internal/restic/file_test.go diff --git a/internal/find.go b/internal/restic/find.go similarity index 100% rename from internal/find.go rename to internal/restic/find.go diff --git a/internal/find_test.go b/internal/restic/find_test.go similarity index 98% rename from internal/find_test.go rename to internal/restic/find_test.go index 8575da910..d3620b472 100644 --- a/internal/find_test.go +++ b/internal/restic/find_test.go @@ -12,9 +12,8 @@ import ( "testing" "time" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" ) func loadIDSet(t testing.TB, filename string) restic.BlobSet { diff --git a/internal/hardlinks_index.go b/internal/restic/hardlinks_index.go similarity index 100% rename from internal/hardlinks_index.go rename to internal/restic/hardlinks_index.go diff --git a/internal/hardlinks_index_test.go b/internal/restic/hardlinks_index_test.go similarity index 93% rename from internal/hardlinks_index_test.go rename to internal/restic/hardlinks_index_test.go index cf140003e..a30456cf0 100644 --- a/internal/hardlinks_index_test.go +++ b/internal/restic/hardlinks_index_test.go @@ -3,7 +3,7 @@ package restic_test import ( "testing" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/id.go b/internal/restic/id.go similarity index 100% rename from internal/id.go rename to internal/restic/id.go diff --git a/internal/id_int_test.go b/internal/restic/id_int_test.go similarity index 100% rename from internal/id_int_test.go rename to internal/restic/id_int_test.go diff --git a/internal/id_test.go b/internal/restic/id_test.go similarity index 100% rename from internal/id_test.go rename to internal/restic/id_test.go diff --git a/internal/ids.go b/internal/restic/ids.go similarity index 100% rename from internal/ids.go rename to internal/restic/ids.go diff --git a/internal/ids_test.go b/internal/restic/ids_test.go similarity index 100% rename from internal/ids_test.go rename to internal/restic/ids_test.go diff --git a/internal/idset.go b/internal/restic/idset.go similarity index 100% rename from internal/idset.go rename to internal/restic/idset.go diff --git a/internal/idset_test.go b/internal/restic/idset_test.go similarity index 100% rename from internal/idset_test.go rename to internal/restic/idset_test.go diff --git a/internal/lock.go b/internal/restic/lock.go similarity index 100% rename from internal/lock.go rename to internal/restic/lock.go diff --git a/internal/lock_test.go b/internal/restic/lock_test.go similarity index 99% rename from internal/lock_test.go rename to internal/restic/lock_test.go index 0e6223aff..b0b03abce 100644 --- a/internal/lock_test.go +++ b/internal/restic/lock_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/lock_unix.go b/internal/restic/lock_unix.go similarity index 100% rename from internal/lock_unix.go rename to internal/restic/lock_unix.go diff --git a/internal/lock_windows.go b/internal/restic/lock_windows.go similarity index 100% rename from internal/lock_windows.go rename to internal/restic/lock_windows.go diff --git a/internal/node.go b/internal/restic/node.go similarity index 100% rename from internal/node.go rename to internal/restic/node.go diff --git a/internal/node_darwin.go b/internal/restic/node_darwin.go similarity index 100% rename from internal/node_darwin.go rename to internal/restic/node_darwin.go diff --git a/internal/node_freebsd.go b/internal/restic/node_freebsd.go similarity index 100% rename from internal/node_freebsd.go rename to internal/restic/node_freebsd.go diff --git a/internal/node_linux.go b/internal/restic/node_linux.go similarity index 100% rename from internal/node_linux.go rename to internal/restic/node_linux.go diff --git a/internal/node_openbsd.go b/internal/restic/node_openbsd.go similarity index 100% rename from internal/node_openbsd.go rename to internal/restic/node_openbsd.go diff --git a/internal/node_test.go b/internal/restic/node_test.go similarity index 99% rename from internal/node_test.go rename to internal/restic/node_test.go index 542b753ca..47a9abdb2 100644 --- a/internal/node_test.go +++ b/internal/restic/node_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/node_unix.go b/internal/restic/node_unix.go similarity index 100% rename from internal/node_unix.go rename to internal/restic/node_unix.go diff --git a/internal/node_unix_test.go b/internal/restic/node_unix_test.go similarity index 100% rename from internal/node_unix_test.go rename to internal/restic/node_unix_test.go diff --git a/internal/node_windows.go b/internal/restic/node_windows.go similarity index 100% rename from internal/node_windows.go rename to internal/restic/node_windows.go diff --git a/internal/node_xattr.go b/internal/restic/node_xattr.go similarity index 100% rename from internal/node_xattr.go rename to internal/restic/node_xattr.go diff --git a/internal/progress.go b/internal/restic/progress.go similarity index 100% rename from internal/progress.go rename to internal/restic/progress.go diff --git a/internal/progress_unix.go b/internal/restic/progress_unix.go similarity index 100% rename from internal/progress_unix.go rename to internal/restic/progress_unix.go diff --git a/internal/progress_unix_with_siginfo.go b/internal/restic/progress_unix_with_siginfo.go similarity index 100% rename from internal/progress_unix_with_siginfo.go rename to internal/restic/progress_unix_with_siginfo.go diff --git a/internal/rand_reader.go b/internal/restic/rand_reader.go similarity index 100% rename from internal/rand_reader.go rename to internal/restic/rand_reader.go diff --git a/internal/readerat.go b/internal/restic/readerat.go similarity index 100% rename from internal/readerat.go rename to internal/restic/readerat.go diff --git a/internal/repository.go b/internal/restic/repository.go similarity index 100% rename from internal/repository.go rename to internal/restic/repository.go diff --git a/internal/restorer.go b/internal/restic/restorer.go similarity index 100% rename from internal/restorer.go rename to internal/restic/restorer.go diff --git a/internal/snapshot.go b/internal/restic/snapshot.go similarity index 100% rename from internal/snapshot.go rename to internal/restic/snapshot.go diff --git a/internal/snapshot_find.go b/internal/restic/snapshot_find.go similarity index 100% rename from internal/snapshot_find.go rename to internal/restic/snapshot_find.go diff --git a/internal/snapshot_policy.go b/internal/restic/snapshot_policy.go similarity index 100% rename from internal/snapshot_policy.go rename to internal/restic/snapshot_policy.go diff --git a/internal/snapshot_policy_test.go b/internal/restic/snapshot_policy_test.go similarity index 99% rename from internal/snapshot_policy_test.go rename to internal/restic/snapshot_policy_test.go index 3eb8b4ce8..e0cdeeeba 100644 --- a/internal/snapshot_policy_test.go +++ b/internal/restic/snapshot_policy_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" ) func parseTimeUTC(s string) time.Time { diff --git a/internal/snapshot_test.go b/internal/restic/snapshot_test.go similarity index 83% rename from internal/snapshot_test.go rename to internal/restic/snapshot_test.go index 74db91895..50ebe7297 100644 --- a/internal/snapshot_test.go +++ b/internal/restic/snapshot_test.go @@ -3,7 +3,7 @@ package restic_test import ( "testing" - "github.com/restic/restic/internal" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/tag_list.go b/internal/restic/tag_list.go similarity index 100% rename from internal/tag_list.go rename to internal/restic/tag_list.go diff --git a/internal/testdata/filter_snapshots_0 b/internal/restic/testdata/filter_snapshots_0 similarity index 100% rename from internal/testdata/filter_snapshots_0 rename to internal/restic/testdata/filter_snapshots_0 diff --git a/internal/testdata/filter_snapshots_1 b/internal/restic/testdata/filter_snapshots_1 similarity index 100% rename from internal/testdata/filter_snapshots_1 rename to internal/restic/testdata/filter_snapshots_1 diff --git a/internal/testdata/filter_snapshots_2 b/internal/restic/testdata/filter_snapshots_2 similarity index 100% rename from internal/testdata/filter_snapshots_2 rename to internal/restic/testdata/filter_snapshots_2 diff --git a/internal/testdata/filter_snapshots_3 b/internal/restic/testdata/filter_snapshots_3 similarity index 100% rename from internal/testdata/filter_snapshots_3 rename to internal/restic/testdata/filter_snapshots_3 diff --git a/internal/testdata/filter_snapshots_4 b/internal/restic/testdata/filter_snapshots_4 similarity index 100% rename from internal/testdata/filter_snapshots_4 rename to internal/restic/testdata/filter_snapshots_4 diff --git a/internal/testdata/filter_snapshots_5 b/internal/restic/testdata/filter_snapshots_5 similarity index 100% rename from internal/testdata/filter_snapshots_5 rename to internal/restic/testdata/filter_snapshots_5 diff --git a/internal/testdata/filter_snapshots_6 b/internal/restic/testdata/filter_snapshots_6 similarity index 100% rename from internal/testdata/filter_snapshots_6 rename to internal/restic/testdata/filter_snapshots_6 diff --git a/internal/testdata/filter_snapshots_7 b/internal/restic/testdata/filter_snapshots_7 similarity index 100% rename from internal/testdata/filter_snapshots_7 rename to internal/restic/testdata/filter_snapshots_7 diff --git a/internal/testdata/filter_snapshots_8 b/internal/restic/testdata/filter_snapshots_8 similarity index 100% rename from internal/testdata/filter_snapshots_8 rename to internal/restic/testdata/filter_snapshots_8 diff --git a/internal/testdata/filter_snapshots_9 b/internal/restic/testdata/filter_snapshots_9 similarity index 100% rename from internal/testdata/filter_snapshots_9 rename to internal/restic/testdata/filter_snapshots_9 diff --git a/internal/testdata/policy_keep_snapshots_0 b/internal/restic/testdata/policy_keep_snapshots_0 similarity index 100% rename from internal/testdata/policy_keep_snapshots_0 rename to internal/restic/testdata/policy_keep_snapshots_0 diff --git a/internal/testdata/policy_keep_snapshots_1 b/internal/restic/testdata/policy_keep_snapshots_1 similarity index 100% rename from internal/testdata/policy_keep_snapshots_1 rename to internal/restic/testdata/policy_keep_snapshots_1 diff --git a/internal/testdata/policy_keep_snapshots_10 b/internal/restic/testdata/policy_keep_snapshots_10 similarity index 100% rename from internal/testdata/policy_keep_snapshots_10 rename to internal/restic/testdata/policy_keep_snapshots_10 diff --git a/internal/testdata/policy_keep_snapshots_11 b/internal/restic/testdata/policy_keep_snapshots_11 similarity index 100% rename from internal/testdata/policy_keep_snapshots_11 rename to internal/restic/testdata/policy_keep_snapshots_11 diff --git a/internal/testdata/policy_keep_snapshots_12 b/internal/restic/testdata/policy_keep_snapshots_12 similarity index 100% rename from internal/testdata/policy_keep_snapshots_12 rename to internal/restic/testdata/policy_keep_snapshots_12 diff --git a/internal/testdata/policy_keep_snapshots_13 b/internal/restic/testdata/policy_keep_snapshots_13 similarity index 100% rename from internal/testdata/policy_keep_snapshots_13 rename to internal/restic/testdata/policy_keep_snapshots_13 diff --git a/internal/testdata/policy_keep_snapshots_14 b/internal/restic/testdata/policy_keep_snapshots_14 similarity index 100% rename from internal/testdata/policy_keep_snapshots_14 rename to internal/restic/testdata/policy_keep_snapshots_14 diff --git a/internal/testdata/policy_keep_snapshots_15 b/internal/restic/testdata/policy_keep_snapshots_15 similarity index 100% rename from internal/testdata/policy_keep_snapshots_15 rename to internal/restic/testdata/policy_keep_snapshots_15 diff --git a/internal/testdata/policy_keep_snapshots_16 b/internal/restic/testdata/policy_keep_snapshots_16 similarity index 100% rename from internal/testdata/policy_keep_snapshots_16 rename to internal/restic/testdata/policy_keep_snapshots_16 diff --git a/internal/testdata/policy_keep_snapshots_17 b/internal/restic/testdata/policy_keep_snapshots_17 similarity index 100% rename from internal/testdata/policy_keep_snapshots_17 rename to internal/restic/testdata/policy_keep_snapshots_17 diff --git a/internal/testdata/policy_keep_snapshots_18 b/internal/restic/testdata/policy_keep_snapshots_18 similarity index 100% rename from internal/testdata/policy_keep_snapshots_18 rename to internal/restic/testdata/policy_keep_snapshots_18 diff --git a/internal/testdata/policy_keep_snapshots_19 b/internal/restic/testdata/policy_keep_snapshots_19 similarity index 100% rename from internal/testdata/policy_keep_snapshots_19 rename to internal/restic/testdata/policy_keep_snapshots_19 diff --git a/internal/testdata/policy_keep_snapshots_2 b/internal/restic/testdata/policy_keep_snapshots_2 similarity index 100% rename from internal/testdata/policy_keep_snapshots_2 rename to internal/restic/testdata/policy_keep_snapshots_2 diff --git a/internal/testdata/policy_keep_snapshots_20 b/internal/restic/testdata/policy_keep_snapshots_20 similarity index 100% rename from internal/testdata/policy_keep_snapshots_20 rename to internal/restic/testdata/policy_keep_snapshots_20 diff --git a/internal/testdata/policy_keep_snapshots_3 b/internal/restic/testdata/policy_keep_snapshots_3 similarity index 100% rename from internal/testdata/policy_keep_snapshots_3 rename to internal/restic/testdata/policy_keep_snapshots_3 diff --git a/internal/testdata/policy_keep_snapshots_4 b/internal/restic/testdata/policy_keep_snapshots_4 similarity index 100% rename from internal/testdata/policy_keep_snapshots_4 rename to internal/restic/testdata/policy_keep_snapshots_4 diff --git a/internal/testdata/policy_keep_snapshots_5 b/internal/restic/testdata/policy_keep_snapshots_5 similarity index 100% rename from internal/testdata/policy_keep_snapshots_5 rename to internal/restic/testdata/policy_keep_snapshots_5 diff --git a/internal/testdata/policy_keep_snapshots_6 b/internal/restic/testdata/policy_keep_snapshots_6 similarity index 100% rename from internal/testdata/policy_keep_snapshots_6 rename to internal/restic/testdata/policy_keep_snapshots_6 diff --git a/internal/testdata/policy_keep_snapshots_7 b/internal/restic/testdata/policy_keep_snapshots_7 similarity index 100% rename from internal/testdata/policy_keep_snapshots_7 rename to internal/restic/testdata/policy_keep_snapshots_7 diff --git a/internal/testdata/policy_keep_snapshots_8 b/internal/restic/testdata/policy_keep_snapshots_8 similarity index 100% rename from internal/testdata/policy_keep_snapshots_8 rename to internal/restic/testdata/policy_keep_snapshots_8 diff --git a/internal/testdata/policy_keep_snapshots_9 b/internal/restic/testdata/policy_keep_snapshots_9 similarity index 100% rename from internal/testdata/policy_keep_snapshots_9 rename to internal/restic/testdata/policy_keep_snapshots_9 diff --git a/internal/testdata/used_blobs_snapshot0 b/internal/restic/testdata/used_blobs_snapshot0 similarity index 100% rename from internal/testdata/used_blobs_snapshot0 rename to internal/restic/testdata/used_blobs_snapshot0 diff --git a/internal/testdata/used_blobs_snapshot1 b/internal/restic/testdata/used_blobs_snapshot1 similarity index 100% rename from internal/testdata/used_blobs_snapshot1 rename to internal/restic/testdata/used_blobs_snapshot1 diff --git a/internal/testdata/used_blobs_snapshot2 b/internal/restic/testdata/used_blobs_snapshot2 similarity index 100% rename from internal/testdata/used_blobs_snapshot2 rename to internal/restic/testdata/used_blobs_snapshot2 diff --git a/internal/testing.go b/internal/restic/testing.go similarity index 100% rename from internal/testing.go rename to internal/restic/testing.go diff --git a/internal/testing_test.go b/internal/restic/testing_test.go similarity index 96% rename from internal/testing_test.go rename to internal/restic/testing_test.go index bb7757743..0386fb76a 100644 --- a/internal/testing_test.go +++ b/internal/restic/testing_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/checker" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" ) var testSnapshotTime = time.Unix(1460289341, 207401672) diff --git a/internal/tree.go b/internal/restic/tree.go similarity index 100% rename from internal/tree.go rename to internal/restic/tree.go diff --git a/internal/tree_test.go b/internal/restic/tree_test.go similarity index 98% rename from internal/tree_test.go rename to internal/restic/tree_test.go index 1f05e8cc5..d0d08007b 100644 --- a/internal/tree_test.go +++ b/internal/restic/tree_test.go @@ -8,8 +8,8 @@ import ( "path/filepath" "testing" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" ) diff --git a/internal/walk/walk.go b/internal/walk/walk.go index 1e9df19d8..0a0ab7c9e 100644 --- a/internal/walk/walk.go +++ b/internal/walk/walk.go @@ -7,9 +7,8 @@ import ( "path/filepath" "sync" - "github.com/restic/restic/internal" - "github.com/restic/restic/internal/debug" + "github.com/restic/restic/internal/restic" ) // TreeJob is a job sent from the tree walker. diff --git a/internal/walk/walk_test.go b/internal/walk/walk_test.go index de45d680d..801e0aa32 100644 --- a/internal/walk/walk_test.go +++ b/internal/walk/walk_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" - "github.com/restic/restic/internal" "github.com/restic/restic/internal/archiver" "github.com/restic/restic/internal/pipe" "github.com/restic/restic/internal/repository" + "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" "github.com/restic/restic/internal/walk" )