Update vendoring

This commit is contained in:
Jeff Mitchell
2016-06-01 10:24:48 -04:00
parent ed0897330b
commit 7fd919f908
229 changed files with 13493 additions and 9865 deletions

View File

@@ -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))