Documentation
¶
Index ¶
- Variables
- func CheckOverflowFloat(x float64, k reflect.Kind) bool
- func CheckOverflowInt(x int64, k reflect.Kind) bool
- func CheckOverflowUInt(x uint64, k reflect.Kind) bool
- func ConvertFloatToFloat64(num interface{}) (float64, bool)
- func ConvertSignedIntToInt64(num interface{}) (int64, bool)
- func ConvertToReflectType(v Value, toType reflect.Kind) (value reflect.Value, ok bool)
- func ConvertUnsignedIntToUInt64(num interface{}) (uint64, bool)
- func Equal(expect, real interface{}) bool
- func FloatEqual(a, b float64) bool
- func FloatEqualC(a, b, eps float64) bool
- func FloatIsInt(f float64) bool
- func FloatIsInt64(f float64) bool
- func FloatIsIntC(f, eps float64) bool
- func FloatIsUInt64(f float64) bool
- func FloatToInt64(f float64) int64
- func FloatToUInt64(f float64) uint64
- func InSlice(container interface{}, expect interface{}) (exist bool)
- func ParseBool(b interface{}) (v bool, ok bool)
- func ParseBoolFromNumber(number *GenericNumber) bool
- func ParseBoolFromString(b string) (v bool, ok bool)
- func ToString(v interface{}) string
- type GenericNumber
- func BigFloatFromString(num string) (*GenericNumber, bool)
- func BigIntFromString(num string) (*GenericNumber, bool)
- func FloatFromString(num string) (*GenericNumber, bool)
- func IntFromString(num string) (*GenericNumber, bool)
- func NumberFromBasicFloat(num interface{}) (*GenericNumber, bool)
- func NumberFromBasicInt(num interface{}) (*GenericNumber, bool)
- func NumberFromBasicIntType(num interface{}) (*GenericNumber, bool)
- func NumberFromBasicType(num interface{}) (*GenericNumber, bool)
- func NumberFromBasicUInt(num interface{}) (*GenericNumber, bool)
- func NumberFromString(num string) (*GenericNumber, bool)
- func ParseNumber(num interface{}) (*GenericNumber, bool)
- func UIntFromString(num string) (*GenericNumber, bool)
- func (num *GenericNumber) Above64bit() bool
- func (num *GenericNumber) Float() bool
- func (num *GenericNumber) Float64() float64
- func (num *GenericNumber) Int64() int64
- func (num *GenericNumber) IsFloat64() bool
- func (num *GenericNumber) IsInt64() bool
- func (num *GenericNumber) IsUInt64() bool
- func (num *GenericNumber) String() string
- func (num *GenericNumber) UInt64() uint64
- func (num *GenericNumber) Unsigned() bool
- type Number
- type String
- type Stringer
- type Type
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidType = fmt.Errorf("invalid type")
View Source
var ErrTooLarge = fmt.Errorf("value too large")
View Source
var FloatEps = 1e-8 // tolerance