MCPcopy
hub / github.com/tinylib/msgp / Number

Struct Number

msgp/number.go:22–29  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

20// both the type and the value
21// of the number.
22type 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.
32func (n *Number) AsInt(i int64) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected