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