Uint returns v's underlying value. It panics if v's underlying type is not TypeUint8, TypeUint16, TypeUint32, or TypeUint64.
()
| 82 | // Uint returns v's underlying value. It panics if v's underlying type is not |
| 83 | // TypeUint8, TypeUint16, TypeUint32, or TypeUint64. |
| 84 | func (v Value) Uint() uint64 { |
| 85 | if v.Type().ID() > IDUint64 { |
| 86 | panic(fmt.Sprintf("super.Value.Uint called on %T", v.Type())) |
| 87 | } |
| 88 | if x, ok := v.native(); ok { |
| 89 | return x |
| 90 | } |
| 91 | return DecodeUint(v.bytes()) |
| 92 | } |
| 93 | |
| 94 | // Int returns v's underlying value. It panics if v's underlying type is not |
| 95 | // TypeInt8, TypeInt16, TypeInt32, TypeInt64, TypeDuration, or TypeTime. |
no test coverage detected