Int returns the value as int64. Will be zero-valued if the value is not actually numeric. The value was originally a float, it will be truncated.
()
| 86 | // Int returns the value as int64. Will be zero-valued if the value is not actually numeric. The value was originally |
| 87 | // a float, it will be truncated. |
| 88 | func (rv ReturnValue) Int() int64 { |
| 89 | if aws.StringValue(rv.av.N) == "" { |
| 90 | return 0 |
| 91 | } |
| 92 | |
| 93 | f, _, _ := new(big.Float).Parse(aws.StringValue(rv.av.N), 10) |
| 94 | i, _ := f.Int64() |
| 95 | |
| 96 | return i |
| 97 | } |
| 98 | |
| 99 | // Float returns the value as float64. Will be zero-valued if the value is not numeric. If the value |
| 100 | // was originally stored as an int, it will be converted to float64 based on parsing the string |
no outgoing calls