diff options
author | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:37 -0500 |
---|---|---|
committer | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:37 -0500 |
commit | 15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (patch) | |
tree | 255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go | |
parent | 07971ca38143c5faf951d152fba370ddcbe26ad5 (diff) | |
download | terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.gz terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.zst terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.zip |
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
Updated via: go get github.com/hashicorp/terraform@sdk-v0.11-with-go-modules and go mod tidy
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.go | 11 |
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 | } |