mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-24 13:55:11 +00:00
Update vendoring
This commit is contained in:
12
vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/decode.go
generated
vendored
12
vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/decode.go
generated
vendored
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/dynamodb"
|
||||
)
|
||||
@@ -454,6 +455,17 @@ func (d *Decoder) decodeString(s *string, v reflect.Value, fieldTag tag) error {
|
||||
return d.decodeNumber(s, v)
|
||||
}
|
||||
|
||||
// To maintain backwards compatibility with ConvertFrom family of methods which
|
||||
// converted strings to time.Time structs
|
||||
if _, ok := v.Interface().(time.Time); ok {
|
||||
t, err := time.Parse(time.RFC3339, *s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
v.Set(reflect.ValueOf(t))
|
||||
return nil
|
||||
}
|
||||
|
||||
switch v.Kind() {
|
||||
case reflect.String, reflect.Interface:
|
||||
v.Set(reflect.ValueOf(*s))
|
||||
|
||||
Reference in New Issue
Block a user