MCPcopy
hub / github.com/aws/aws-lambda-go / Float

Method Float

events/attributevalue.go:103–106  ·  view source on GitHub ↗

Float provides access to an attribute of type Number. DynamoDB sends the values as strings. For convenience this method provides conversion to float64. The returned value is the nearest floating point number rounded using IEEE754 unbiased rounding. If the number is more than 1/2 ULP away from the la

()

Source from the content-addressed store, hash-verified

101// the value returned is ±Inf, err.Err = ErrRange.
102// Method panics if the attribute is not of type Number.
103func (av DynamoDBAttributeValue) Float() (float64, error) {
104 s, err := strconv.ParseFloat(av.Number(), 64)
105 return s, err
106}
107
108// NumberSet provides access to an attribute of type Number Set.
109// DynamoDB sends the numbers as strings.

Callers 2

TestUnmarshalFloatFunction · 0.95

Calls 1

NumberMethod · 0.95

Tested by 2

TestUnmarshalFloatFunction · 0.76