@@ -567,7 +567,6 @@ func (f *Fetcher) parseARN(arnURL string) (string, string, string, error) {
567
567
urlSplit := strings .Split (arnURL , "/" )
568
568
569
569
// Determine if the ARN is for an access point or a bucket.
570
- var bucket , key string
571
570
if strings .HasPrefix (s3arn .Resource , "accesspoint/" ) {
572
571
// urlSplit must consist of arn, name of accesspoint, and key
573
572
if len (urlSplit ) < 3 {
@@ -578,8 +577,8 @@ func (f *Fetcher) parseARN(arnURL string) (string, string, string, error) {
578
577
// you provide the access point ARN in place of the bucket name.
579
578
// For more information about access point ARNs, see Using access points
580
579
// https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html
581
- bucket = strings .Join (urlSplit [:2 ], "/" )
582
- key = strings .Join (urlSplit [2 :], "/" )
580
+ bucket : = strings .Join (urlSplit [:2 ], "/" )
581
+ key : = strings .Join (urlSplit [2 :], "/" )
583
582
return bucket , key , s3arn .Region , nil
584
583
}
585
584
// urlSplit must consist of name of bucket and key
@@ -591,7 +590,7 @@ func (f *Fetcher) parseARN(arnURL string) (string, string, string, error) {
591
590
// If specified, the key is part of the Relative ID which has the format "bucket-name/object-key" according to
592
591
// https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-arn-format.html
593
592
bucketUrlSplit := strings .Split (urlSplit [0 ], ":" )
594
- bucket = bucketUrlSplit [len (bucketUrlSplit )- 1 ]
595
- key = strings .Join (urlSplit [1 :], "/" )
593
+ bucket : = bucketUrlSplit [len (bucketUrlSplit )- 1 ]
594
+ key : = strings .Join (urlSplit [1 :], "/" )
596
595
return bucket , key , "" , nil
597
596
}
0 commit comments