Skip to content

Fix DynamoDBAttributeValue String type check#632

Open
kiwigitops wants to merge 1 commit into
aws:mainfrom
kiwigitops:fix/dynamodb-string-accessor
Open

Fix DynamoDBAttributeValue String type check#632
kiwigitops wants to merge 1 commit into
aws:mainfrom
kiwigitops:fix/dynamodb-string-accessor

Conversation

@kiwigitops

Copy link
Copy Markdown

Summary

  • make DynamoDBAttributeValue.String() enforce DataTypeString, matching its documented accessor behavior
  • keep %#v formatting safe by moving the struct-formatting behavior to GoString()
  • add regression coverage for wrong-type String() access and safe debug formatting

Closes #510.

Tests

  • go test ./events

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.21%. Comparing base (87e344b) to head (5b0bfab).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #632      +/-   ##
==========================================
+ Coverage   75.12%   75.21%   +0.08%     
==========================================
  Files          36       36              
  Lines        1419     1420       +1     
==========================================
+ Hits         1066     1068       +2     
+ Misses        274      273       -1     
  Partials       79       79              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kiwigitops kiwigitops force-pushed the fix/dynamodb-string-accessor branch from 5b0bfab to 2662384 Compare June 20, 2026 21:07
@kiwigitops

Copy link
Copy Markdown
Author

Quick follow-up: I pushed a small lint cleanup after opening this PR. The focused events tests and go vet pass locally, and Codecov reports the modified lines covered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DynamoDBAttributeValue.String() accessor method inconsistent with documented behavior

2 participants