aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go')
-rw-r--r--vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
index ec3ffe4..a7fbc2d 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
@@ -8,7 +8,6 @@ import (
8 8
9 "github.com/aws/aws-sdk-go/aws" 9 "github.com/aws/aws-sdk-go/aws"
10 "github.com/aws/aws-sdk-go/aws/awserr" 10 "github.com/aws/aws-sdk-go/aws/awserr"
11 "github.com/aws/aws-sdk-go/aws/awsutil"
12 "github.com/aws/aws-sdk-go/aws/request" 11 "github.com/aws/aws-sdk-go/aws/request"
13) 12)
14 13
@@ -113,15 +112,9 @@ func updateEndpointForAccelerate(r *request.Request) {
113// Attempts to retrieve the bucket name from the request input parameters. 112// Attempts to retrieve the bucket name from the request input parameters.
114// If no bucket is found, or the field is empty "", false will be returned. 113// If no bucket is found, or the field is empty "", false will be returned.
115func bucketNameFromReqParams(params interface{}) (string, bool) { 114func bucketNameFromReqParams(params interface{}) (string, bool) {
116 b, _ := awsutil.ValuesAtPath(params, "Bucket") 115 if iface, ok := params.(bucketGetter); ok {
117 if len(b) == 0 { 116 b := iface.getBucket()
118 return "", false 117 return b, len(b) > 0
119 }
120
121 if bucket, ok := b[0].(*string); ok {
122 if bucketStr := aws.StringValue(bucket); bucketStr != "" {
123 return bucketStr, true
124 }
125 } 118 }
126 119
127 return "", false 120 return "", false