Int returns v's underlying value. It panics if v's underlying type is not TypeInt8, TypeInt16, TypeInt32, TypeInt64, TypeDuration, or TypeTime.
()
| 94 | // Int returns v's underlying value. It panics if v's underlying type is not |
| 95 | // TypeInt8, TypeInt16, TypeInt32, TypeInt64, TypeDuration, or TypeTime. |
| 96 | func (v Value) Int() int64 { |
| 97 | if !IsSigned(v.Type().ID()) { |
| 98 | panic(fmt.Sprintf("super.Value.Int called on %T", v.Type())) |
| 99 | } |
| 100 | if x, ok := v.native(); ok { |
| 101 | return int64(x) |
| 102 | } |
| 103 | return DecodeInt(v.bytes()) |
| 104 | } |
| 105 | |
| 106 | // Float returns v's underlying value. It panics if v's underlying type is not |
| 107 | // TypeFloat16, TypeFloat32, or TypeFloat64. |
no test coverage detected