From a53a3fcc48449b6a11675c0f40a7ae2e81cf8bfb Mon Sep 17 00:00:00 2001 From: Adam Ryman Date: Fri, 13 Oct 2023 10:42:31 -0700 Subject: [PATCH] Update install command to be in module syntax Additionally fix the Cp command, it was left behind in 466e14e https://github.com/metaverse/fasts3/pull/3 After this PR is merged, we can create tag v1.4.0, afterwhich `go install github.com/metaverse/fasts3@latest` will install these changes. --- README.md | 2 +- cmd/cp.go | 4 ++-- cmd/root.go | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7536c43..ba3b44d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Fast s3 utility is a faster version of s3cmd's ls, get, and cp functions ideal f # Installation ```bash -go get -u github.com/metaverse/fasts3 +go install github.com/metaverse/fasts3@latest ``` This should install the binary under `$GOPATH/bin/` diff --git a/cmd/cp.go b/cmd/cp.go index 0d6b2d2..b533818 100644 --- a/cmd/cp.go +++ b/cmd/cp.go @@ -6,8 +6,8 @@ import ( "strings" "github.com/aws/aws-sdk-go/service/s3" - "github.com/spf13/cobra" "github.com/metaverse/fasts3/s3wrapper" + "github.com/spf13/cobra" ) // cpCmd represents the cp command @@ -25,7 +25,7 @@ var cpCmd = &cobra.Command{ if err != nil { log.Fatal(err) } - err = Cp(s3Client, args, recursive, delimiter, searchDepth, keyRegex, flat) + err = Cp(GetS3Client(), args, recursive, delimiter, searchDepth, keyRegex, flat) if err != nil { log.Fatal(err) } diff --git a/cmd/root.go b/cmd/root.go index bd29879..74fc86f 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -26,8 +26,6 @@ var rootCmd = &cobra.Command{ } var ( - s3Client *s3.S3 - keyRegex string delimiter string searchDepth int