diff --git a/command/app.go b/command/app.go index ceafb7394..2f0e6b1f2 100644 --- a/command/app.go +++ b/command/app.go @@ -8,10 +8,10 @@ import ( "github.com/urfave/cli/v2" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/log/stat" - "github.com/peak/s5cmd/parallel" - "github.com/peak/s5cmd/storage" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/log/stat" + "github.com/peak/s5cmd/v2/parallel" + "github.com/peak/s5cmd/v2/storage" ) const ( diff --git a/command/auto_complete.go b/command/auto_complete.go index 7c37df72e..fe01f9495 100644 --- a/command/auto_complete.go +++ b/command/auto_complete.go @@ -7,8 +7,8 @@ import ( "path/filepath" "strings" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" "github.com/urfave/cli/v2" ) diff --git a/command/bucket_version.go b/command/bucket_version.go index fb0875b76..5bd91271e 100644 --- a/command/bucket_version.go +++ b/command/bucket_version.go @@ -7,10 +7,10 @@ import ( "github.com/urfave/cli/v2" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" - "github.com/peak/s5cmd/strutil" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" + "github.com/peak/s5cmd/v2/strutil" ) var bucketVersionHelpTemplate = `Name: diff --git a/command/cat.go b/command/cat.go index 6ed2af502..931f3f258 100644 --- a/command/cat.go +++ b/command/cat.go @@ -8,9 +8,9 @@ import ( "github.com/urfave/cli/v2" - "github.com/peak/s5cmd/log/stat" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/log/stat" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" ) var catHelpTemplate = `Name: diff --git a/command/context.go b/command/context.go index b6d9190cc..3e3f5d08d 100644 --- a/command/context.go +++ b/command/context.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/storage/url" "github.com/urfave/cli/v2" ) diff --git a/command/context_test.go b/command/context_test.go index cad4b662f..3e7536319 100644 --- a/command/context_test.go +++ b/command/context_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/storage/url" "github.com/urfave/cli/v2" ) diff --git a/command/cp.go b/command/cp.go index cb94076e1..3ae2f4a39 100644 --- a/command/cp.go +++ b/command/cp.go @@ -14,12 +14,12 @@ import ( "github.com/hashicorp/go-multierror" "github.com/urfave/cli/v2" - errorpkg "github.com/peak/s5cmd/error" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/log/stat" - "github.com/peak/s5cmd/parallel" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + errorpkg "github.com/peak/s5cmd/v2/error" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/log/stat" + "github.com/peak/s5cmd/v2/parallel" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" ) const ( diff --git a/command/du.go b/command/du.go index a380f4283..3a46aab03 100644 --- a/command/du.go +++ b/command/du.go @@ -9,12 +9,12 @@ import ( "github.com/hashicorp/go-multierror" "github.com/urfave/cli/v2" - errorpkg "github.com/peak/s5cmd/error" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/log/stat" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" - "github.com/peak/s5cmd/strutil" + errorpkg "github.com/peak/s5cmd/v2/error" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/log/stat" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" + "github.com/peak/s5cmd/v2/strutil" ) var sizeHelpTemplate = `Name: diff --git a/command/error.go b/command/error.go index 659246a9a..66b91a336 100644 --- a/command/error.go +++ b/command/error.go @@ -6,9 +6,9 @@ import ( "github.com/hashicorp/go-multierror" - errorpkg "github.com/peak/s5cmd/error" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/storage/url" + errorpkg "github.com/peak/s5cmd/v2/error" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/storage/url" ) func printDebug(op string, err error, urls ...*url.URL) { diff --git a/command/exclude.go b/command/exclude.go index 8bdea1a5b..36d9a9aa9 100644 --- a/command/exclude.go +++ b/command/exclude.go @@ -5,7 +5,7 @@ import ( "regexp" "strings" - "github.com/peak/s5cmd/strutil" + "github.com/peak/s5cmd/v2/strutil" ) // createExcludesFromWildcard creates regex strings from wildcard. diff --git a/command/expand.go b/command/expand.go index 9f419834d..f428937f5 100644 --- a/command/expand.go +++ b/command/expand.go @@ -5,9 +5,9 @@ import ( "errors" "sync" - "github.com/peak/s5cmd/atomic" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/atomic" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" ) // expandSource returns the full list of objects from the given src argument. diff --git a/command/expand_test.go b/command/expand_test.go index 0681c86e4..f7a7dd273 100644 --- a/command/expand_test.go +++ b/command/expand_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/mock" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" ) func TestExpandSources(t *testing.T) { diff --git a/command/ls.go b/command/ls.go index 86e6efbc0..ae14519fb 100644 --- a/command/ls.go +++ b/command/ls.go @@ -7,12 +7,12 @@ import ( "github.com/hashicorp/go-multierror" "github.com/urfave/cli/v2" - errorpkg "github.com/peak/s5cmd/error" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/log/stat" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" - "github.com/peak/s5cmd/strutil" + errorpkg "github.com/peak/s5cmd/v2/error" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/log/stat" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" + "github.com/peak/s5cmd/v2/strutil" ) var listHelpTemplate = `Name: diff --git a/command/mb.go b/command/mb.go index 6b5eabe03..d642ac7a8 100644 --- a/command/mb.go +++ b/command/mb.go @@ -9,10 +9,10 @@ import ( "github.com/urfave/cli/v2" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/log/stat" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/log/stat" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" ) var makeBucketHelpTemplate = `Name: diff --git a/command/mv.go b/command/mv.go index ade2f4112..e6c6937df 100644 --- a/command/mv.go +++ b/command/mv.go @@ -1,7 +1,7 @@ package command import ( - "github.com/peak/s5cmd/log/stat" + "github.com/peak/s5cmd/v2/log/stat" "github.com/urfave/cli/v2" ) diff --git a/command/rb.go b/command/rb.go index db4723cd1..d09c73e12 100644 --- a/command/rb.go +++ b/command/rb.go @@ -5,10 +5,10 @@ import ( "github.com/urfave/cli/v2" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/log/stat" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/log/stat" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" ) var removeBucketHelpTemplate = `Name: diff --git a/command/rm.go b/command/rm.go index 9f1e9bc96..94698abf0 100644 --- a/command/rm.go +++ b/command/rm.go @@ -7,11 +7,11 @@ import ( "github.com/hashicorp/go-multierror" "github.com/urfave/cli/v2" - errorpkg "github.com/peak/s5cmd/error" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/log/stat" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + errorpkg "github.com/peak/s5cmd/v2/error" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/log/stat" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" ) var deleteHelpTemplate = `Name: diff --git a/command/run.go b/command/run.go index 0b1774823..f6ac6687f 100644 --- a/command/run.go +++ b/command/run.go @@ -13,7 +13,7 @@ import ( "github.com/kballard/go-shellquote" "github.com/urfave/cli/v2" - "github.com/peak/s5cmd/parallel" + "github.com/peak/s5cmd/v2/parallel" ) var runHelpTemplate = `Name: diff --git a/command/select.go b/command/select.go index d391f485f..9127bc8e2 100644 --- a/command/select.go +++ b/command/select.go @@ -10,11 +10,11 @@ import ( "github.com/hashicorp/go-multierror" "github.com/urfave/cli/v2" - errorpkg "github.com/peak/s5cmd/error" - "github.com/peak/s5cmd/log/stat" - "github.com/peak/s5cmd/parallel" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + errorpkg "github.com/peak/s5cmd/v2/error" + "github.com/peak/s5cmd/v2/log/stat" + "github.com/peak/s5cmd/v2/parallel" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" ) var selectHelpTemplate = `Name: diff --git a/command/sync.go b/command/sync.go index 23413fd5f..bb7db04b6 100644 --- a/command/sync.go +++ b/command/sync.go @@ -13,11 +13,11 @@ import ( "github.com/lanrat/extsort" "github.com/urfave/cli/v2" - errorpkg "github.com/peak/s5cmd/error" - "github.com/peak/s5cmd/log/stat" - "github.com/peak/s5cmd/parallel" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + errorpkg "github.com/peak/s5cmd/v2/error" + "github.com/peak/s5cmd/v2/log/stat" + "github.com/peak/s5cmd/v2/parallel" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" ) const ( diff --git a/command/sync_strategy.go b/command/sync_strategy.go index cd6db2d36..fe6e948e9 100644 --- a/command/sync_strategy.go +++ b/command/sync_strategy.go @@ -1,8 +1,8 @@ package command import ( - errorpkg "github.com/peak/s5cmd/error" - "github.com/peak/s5cmd/storage" + errorpkg "github.com/peak/s5cmd/v2/error" + "github.com/peak/s5cmd/v2/storage" ) // SyncStrategy is the interface to make decision whether given source object should be synced diff --git a/command/sync_strategy_test.go b/command/sync_strategy_test.go index ecfafa6fd..ba1592990 100644 --- a/command/sync_strategy_test.go +++ b/command/sync_strategy_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - errorpkg "github.com/peak/s5cmd/error" - "github.com/peak/s5cmd/storage" + errorpkg "github.com/peak/s5cmd/v2/error" + "github.com/peak/s5cmd/v2/storage" ) func TestSizeAndModificationStrategy_ShouldSync(t *testing.T) { diff --git a/command/validation.go b/command/validation.go index 8dc2a9ff5..6530fe82f 100644 --- a/command/validation.go +++ b/command/validation.go @@ -4,8 +4,8 @@ import ( "fmt" urlpkg "net/url" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" "github.com/urfave/cli/v2" ) diff --git a/command/version.go b/command/version.go index 0e988eee6..c71462d09 100644 --- a/command/version.go +++ b/command/version.go @@ -5,7 +5,7 @@ import ( "github.com/urfave/cli/v2" - "github.com/peak/s5cmd/version" + "github.com/peak/s5cmd/v2/version" ) func NewVersionCommand() *cli.Command { diff --git a/e2e/app_test.go b/e2e/app_test.go index 3446fb0a4..6ebfd6816 100644 --- a/e2e/app_test.go +++ b/e2e/app_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/peak/s5cmd/command" + "github.com/peak/s5cmd/v2/command" "gotest.tools/v3/assert" "gotest.tools/v3/icmd" diff --git a/e2e/util_test.go b/e2e/util_test.go index 3bf64efeb..83a361ec9 100644 --- a/e2e/util_test.go +++ b/e2e/util_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/strutil" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/strutil" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" diff --git a/error/error.go b/error/error.go index e962b6ff2..e6dddfd98 100644 --- a/error/error.go +++ b/error/error.go @@ -7,8 +7,8 @@ import ( "github.com/hashicorp/go-multierror" - "github.com/peak/s5cmd/storage" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/storage" + "github.com/peak/s5cmd/v2/storage/url" ) // Error is the type that implements error interface. diff --git a/go.mod b/go.mod index 3980c6b9e..30cbd57a3 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/peak/s5cmd +module github.com/peak/s5cmd/v2 go 1.17 diff --git a/log/message.go b/log/message.go index b29621841..8fcbbad20 100644 --- a/log/message.go +++ b/log/message.go @@ -3,8 +3,8 @@ package log import ( "fmt" - "github.com/peak/s5cmd/storage/url" - "github.com/peak/s5cmd/strutil" + "github.com/peak/s5cmd/v2/storage/url" + "github.com/peak/s5cmd/v2/strutil" ) // Message is an interface to print structured logs. diff --git a/log/stat/stat.go b/log/stat/stat.go index 4685467e5..5e0ed4922 100644 --- a/log/stat/stat.go +++ b/log/stat/stat.go @@ -7,7 +7,7 @@ import ( "sync" "text/tabwriter" - "github.com/peak/s5cmd/strutil" + "github.com/peak/s5cmd/v2/strutil" ) const ( diff --git a/main.go b/main.go index 678321a1b..3d835cbcb 100644 --- a/main.go +++ b/main.go @@ -6,7 +6,7 @@ import ( "os/signal" "syscall" - "github.com/peak/s5cmd/command" + "github.com/peak/s5cmd/v2/command" ) func main() { diff --git a/parallel/global.go b/parallel/global.go index 843d4b2e5..61d117eff 100644 --- a/parallel/global.go +++ b/parallel/global.go @@ -1,6 +1,6 @@ package parallel -import "github.com/peak/s5cmd/parallel/fdlimit" +import "github.com/peak/s5cmd/v2/parallel/fdlimit" var global *Manager diff --git a/storage/fs.go b/storage/fs.go index 3626414e6..50e374364 100644 --- a/storage/fs.go +++ b/storage/fs.go @@ -9,7 +9,7 @@ import ( "github.com/karrick/godirwalk" "github.com/termie/go-shutil" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/storage/url" ) // Filesystem is the Storage implementation of a local filesystem. diff --git a/storage/mock_storage.go b/storage/mock_storage.go index 988795545..487b3eb39 100644 --- a/storage/mock_storage.go +++ b/storage/mock_storage.go @@ -7,7 +7,7 @@ import ( mock "github.com/stretchr/testify/mock" - url "github.com/peak/s5cmd/storage/url" + url "github.com/peak/s5cmd/v2/storage/url" ) // MockStorage is an autogenerated mock type for the Storage type diff --git a/storage/s3.go b/storage/s3.go index a3e73ab26..58bd96a29 100644 --- a/storage/s3.go +++ b/storage/s3.go @@ -30,8 +30,8 @@ import ( "github.com/aws/aws-sdk-go/service/s3/s3manager" "github.com/aws/aws-sdk-go/service/s3/s3manager/s3manageriface" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/storage/url" ) var sentinelURL = urlpkg.URL{} diff --git a/storage/s3_test.go b/storage/s3_test.go index 7c4f00a62..d101946b4 100644 --- a/storage/s3_test.go +++ b/storage/s3_test.go @@ -29,8 +29,8 @@ import ( "github.com/google/go-cmp/cmp" "gotest.tools/v3/assert" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/storage/url" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/storage/url" ) func TestS3ImplementsStorageInterface(t *testing.T) { diff --git a/storage/storage.go b/storage/storage.go index 7725d9375..953bb8063 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -11,9 +11,9 @@ import ( "time" "github.com/lanrat/extsort" - "github.com/peak/s5cmd/log" - "github.com/peak/s5cmd/storage/url" - "github.com/peak/s5cmd/strutil" + "github.com/peak/s5cmd/v2/log" + "github.com/peak/s5cmd/v2/storage/url" + "github.com/peak/s5cmd/v2/strutil" ) var ( diff --git a/storage/url/url.go b/storage/url/url.go index f03298e05..5141e1e43 100644 --- a/storage/url/url.go +++ b/storage/url/url.go @@ -14,7 +14,7 @@ import ( "strings" "github.com/lanrat/extsort" - "github.com/peak/s5cmd/strutil" + "github.com/peak/s5cmd/v2/strutil" ) const ( diff --git a/storage/url/url_test.go b/storage/url/url_test.go index 87237cbbc..be374674f 100644 --- a/storage/url/url_test.go +++ b/storage/url/url_test.go @@ -8,7 +8,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/peak/s5cmd/strutil" + "github.com/peak/s5cmd/v2/strutil" ) func TestHasWild(t *testing.T) {