diff --git a/service/dynamodb/dynamodbattribute/tag.go b/service/dynamodb/dynamodbattribute/tag.go index 0b63eb7d1ab..c8f9c28b2f4 100644 --- a/service/dynamodb/dynamodbattribute/tag.go +++ b/service/dynamodb/dynamodbattribute/tag.go @@ -33,7 +33,7 @@ func (t *tag) parseJSONTag(structTag reflect.StructTag) { } func (t *tag) parseTagStr(tagStr string) { - parts := strings.SplitN(tagStr, ",", 2) + parts := strings.Split(tagStr, ",") if len(parts) == 0 { return } diff --git a/service/dynamodb/dynamodbattribute/tag_test.go b/service/dynamodb/dynamodbattribute/tag_test.go index 09701036fec..0524c3d0334 100644 --- a/service/dynamodb/dynamodbattribute/tag_test.go +++ b/service/dynamodb/dynamodbattribute/tag_test.go @@ -30,6 +30,8 @@ func TestTagParse(t *testing.T) { {`dynamodbav:",binaryset"`, false, true, tag{AsBinSet: true}}, {`dynamodbav:",numberset"`, false, true, tag{AsNumSet: true}}, {`dynamodbav:",stringset"`, false, true, tag{AsStrSet: true}}, + {`dynamodbav:",stringset,omitemptyelem"`, false, true, tag{AsStrSet: true,OmitEmptyElem:true}}, + {`dynamodbav:"name,stringset,omitemptyelem"`, false, true, tag{Name: "name",AsStrSet: true,OmitEmptyElem: true}}, } for i, c := range cases {