Documentation ¶
Index ¶
- Variables
- func Cmp(x, y any) (int, error)
- func ConvertJsonNumberToFloat64Array(s []interface{}) ([]float64, error)
- func ConvertToFloatNum(x any) (*big.Float, error)
- func ConvertToIntNum(x any) (*big.Int, error)
- func IsFloatNum(x any) bool
- func IsIntNum(x any) bool
- func IsMap(x any) bool
- func IsPtr(x any) bool
- func IsPtr2AnySlice(x any) bool
- func IsPtr2Slice(x any) bool
- func IsPtr2StructSlice(x any) bool
- func IsSlice(x any) bool
- func Merge(s ...[]any) (result []any)
- func Parse(x any) (typeName string, isPointer bool)
- func ReCallItfc(retry int, method any, params ...any) any
- func SplitByBlockCount(all []interface{}, blockCount int) [][]interface{}
- func SplitByBlockSize(all []interface{}, blockSize int) [][]interface{}
- func Type(x any) string
- func TypeEqualValueEqual(x, y any) bool
- func TypeEqualValueGreater(x, y any) bool
- func TypeEqualValueGreaterOrEqual(x, y any) bool
- func TypeEqualValueLess(x, y any) bool
- func TypeEqualValueLessOrEqual(x, y any) bool
- func TypeEx(x any) (string, error)
- type CommonFunc
- type TypeInfo
- type Val
- func (v Val) Any() any
- func (v Val) IsMap() bool
- func (v Val) IsNil() bool
- func (v Val) IsPointer() bool
- func (v Val) IsSlice() bool
- func (v Val) String() string
- func (v Val) TypeInfo() TypeInfo
- func (v Val) TypeName() string
- func (v Val) TypeReflect() reflect.Type
- func (v Val) Value() reflect.Value
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UnInitIF // Any initialized interface's type is no longer interface, but the type of init value, // var itfc any // Now type of 'itfc' is 'nil' // var itfc any = any("str") // Now type of 'itfc' becomes string, not type of uninitialized interface anymore. UnInitIF any = nil )
View Source
var (
ValNil = NewVal(nil)
)
Functions ¶
func ConvertToIntNum ¶
TODO: 使用gnum.Decimal.Convert 进行替换
func IsFloatNum ¶
func IsPtr2AnySlice ¶
func IsPtr2Slice ¶
IsPtr2Slice returns if x is a pointer to slice. if x is *[]string, return true
func IsPtr2StructSlice ¶
func ReCallItfc ¶
*
@retry 重试次数 @method 调用的函数,比如: api.GetTicker ,注意:不是api.GetTicker(...) @params 参数,顺序一定要按照实际调用函数入参顺序一样 @return 返回
func SplitByBlockCount ¶
func SplitByBlockCount(all []interface{}, blockCount int) [][]interface{}
split all interfaces to multiple []interface that count is blockCount sample: SplitByBlockCount([1, 2, 3, 4, 5], 2) = [ [1, 2, 3], [4, 5] ]
func SplitByBlockSize ¶
func SplitByBlockSize(all []interface{}, blockSize int) [][]interface{}
split all interfaces to multiple []interface that each size <= blockSize sample: SplitByBlockSize([1, 2, 3, 4, 5], 2) = [ [1, 2], [3, 4], [5] ]
func TypeEqualValueEqual ¶
func TypeEqualValueGreater ¶
func TypeEqualValueLess ¶
Types ¶
type CommonFunc ¶
type CommonFunc struct{}
func (*CommonFunc) Merge2 ¶
func (c *CommonFunc) Merge2(s ...[]any) (result []any)
Click to show internal directories.
Click to hide internal directories.