Skip to content

Commit

Permalink
add shortcut for raw AV map marshaling
Browse files Browse the repository at this point in the history
  • Loading branch information
guregu committed May 25, 2020
1 parent 1322bbc commit 030e5ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ func MarshalItem(v interface{}) (map[string]*dynamodb.AttributeValue, error) {

func marshalItem(v interface{}) (map[string]*dynamodb.AttributeValue, error) {
switch x := v.(type) {
case map[string]*dynamodb.AttributeValue:
return x, nil
case awsEncoder:
// special case for AWSEncoding
return dynamodbattribute.MarshalMap(x.iface)
Expand Down

0 comments on commit 030e5ea

Please sign in to comment.