aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go')
-rw-r--r--vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
index 524ca95..75866d0 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
@@ -121,6 +121,10 @@ func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string
121 return nil 121 return nil
122 } 122 }
123 123
124 if _, ok := value.Interface().([]byte); ok {
125 return q.parseScalar(v, value, prefix, tag)
126 }
127
124 // check for unflattened list member 128 // check for unflattened list member
125 if !q.isEC2 && tag.Get("flattened") == "" { 129 if !q.isEC2 && tag.Get("flattened") == "" {
126 if listName := tag.Get("locationNameList"); listName == "" { 130 if listName := tag.Get("locationNameList"); listName == "" {
@@ -229,7 +233,12 @@ func (q *queryParser) parseScalar(v url.Values, r reflect.Value, name string, ta
229 v.Set(name, strconv.FormatFloat(float64(value), 'f', -1, 32)) 233 v.Set(name, strconv.FormatFloat(float64(value), 'f', -1, 32))
230 case time.Time: 234 case time.Time:
231 const ISO8601UTC = "2006-01-02T15:04:05Z" 235 const ISO8601UTC = "2006-01-02T15:04:05Z"
232 v.Set(name, value.UTC().Format(ISO8601UTC)) 236 format := tag.Get("timestampFormat")
237 if len(format) == 0 {
238 format = protocol.ISO8601TimeFormatName
239 }
240
241 v.Set(name, protocol.FormatTime(format, value))
233 default: 242 default:
234 return fmt.Errorf("unsupported value for param %s: %v (%s)", name, r.Interface(), r.Type().Name()) 243 return fmt.Errorf("unsupported value for param %s: %v (%s)", name, r.Interface(), r.Type().Name())
235 } 244 }