Update deps

This commit is contained in:
Jeff Mitchell
2016-09-12 15:16:55 -04:00
parent 536a05a116
commit abd621a9e4
31 changed files with 849 additions and 234 deletions

View File

@@ -449,7 +449,10 @@ func (d *Decoder) decodeMap(avMap map[string]*dynamodb.AttributeValue, v reflect
fields := unionStructFields(v.Type(), d.MarshalOptions)
for k, av := range avMap {
if f, ok := fieldByName(fields, k); ok {
fv := v.FieldByIndex(f.Index)
fv := fieldByIndex(v, f.Index, func(v *reflect.Value) bool {
v.Set(reflect.New(v.Type().Elem()))
return true // to continue the loop.
})
if err := d.decode(av, fv, f.tag); err != nil {
return err
}
@@ -655,7 +658,7 @@ func (e *InvalidUnmarshalError) Message() string {
return "cannot unmarshal to nil value"
}
if e.Type.Kind() != reflect.Ptr {
return "cannot unmasrhal to non-pointer value, got " + e.Type.String()
return "cannot unmarshal to non-pointer value, got " + e.Type.String()
}
return "cannot unmarshal to nil value, " + e.Type.String()
}