The portable parts of the Number implementation Number can be an int64, uint64, float32, or float64 internally. It can decode itself from any of the native messagepack number types. The zero-value of Number is Int(0). Using the equality operator with Number compares both the type and the value of th
| 20 | // both the type and the value |
| 21 | // of the number. |
| 22 | type Number struct { |
| 23 | // internally, this |
| 24 | // is just a tagged union. |
| 25 | // the raw bits of the number |
| 26 | // are stored the same way regardless. |
| 27 | bits uint64 |
| 28 | typ Type |
| 29 | } |
| 30 | |
| 31 | // AsInt sets the number to an int64. |
| 32 | func (n *Number) AsInt(i int64) { |
nothing calls this directly
no outgoing calls
no test coverage detected