diff options
author | appilon <apilon@hashicorp.com> | 2019-02-27 16:43:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-27 16:43:31 -0500 |
commit | 844b5a68d8af4791755b8f0ad293cc99f5959183 (patch) | |
tree | 255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go | |
parent | 303b299eeb6b06e939e35905e4b34cb410dd9dc3 (diff) | |
parent | 15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (diff) | |
download | terraform-provider-statuscake-844b5a68d8af4791755b8f0ad293cc99f5959183.tar.gz terraform-provider-statuscake-844b5a68d8af4791755b8f0ad293cc99f5959183.tar.zst terraform-provider-statuscake-844b5a68d8af4791755b8f0ad293cc99f5959183.zip |
Merge pull request #27 from terraform-providers/go-modules-2019-02-22
[MODULES] Switch to Go Modules
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 | } |