Skip to content

Commit 1ee63f4

Browse files
committed
fixed loses precision for large values #186
1 parent ec56cb7 commit 1ee63f4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

events/attributevalue.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ func (av DynamoDBAttributeValue) Number() string {
7171
// of an int64 of the appropriate sign.
7272
// Method panics if the attribute is not of type Number.
7373
func (av DynamoDBAttributeValue) Integer() (int64, error) {
74-
s, err := strconv.ParseFloat(av.Number(), 64)
75-
return int64(s), err
74+
return strconv.ParseInt(av.Number(), 10, 64)
7675
}
7776

7877
// Float provides access to an attribute of type Number.

0 commit comments

Comments
 (0)