Documentation ¶
Index ¶
- Variables
- func Cmp(x, y interface{}) (int, error)
- func ConvertJsonNumberToFloat64Array(s []interface{}) ([]float64, error)
- func ConvertToFloatNum(x interface{}) (*big.Float, error)
- func ConvertToIntNum(x interface{}) (*big.Int, error)
- func IsFloatNum(x interface{}) bool
- func IsIntNum(x interface{}) bool
- func IsMap(x interface{}) bool
- func IsSlice(x interface{}) bool
- func Merge(s ...[]interface{}) (result []interface{})
- func Parse(x interface{}) (typeName string, isPointer bool)
- func ReCallItfc(retry int, method interface{}, params ...interface{}) interface{}
- func SplitByBlockCount(all []interface{}, blockCount int) [][]interface{}
- func SplitByBlockSize(all []interface{}, blockSize int) [][]interface{}
- func Type(x interface{}) string
- func TypeEqualValueEqual(x, y interface{}) bool
- func TypeEqualValueGreater(x, y interface{}) bool
- func TypeEqualValueGreaterOrEqual(x, y interface{}) bool
- func TypeEqualValueLess(x, y interface{}) bool
- func TypeEqualValueLessOrEqual(x, y interface{}) bool
- func TypeEx(x interface{}) (string, error)
- type CommonFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Any initialized interface's type is no longer interface, but the type of init value, // var itfc interface{} // Now type of 'itfc' is 'nil' // var itfc interface{} = interface{}("str") // Now type of 'itfc' becomes string, not type of uninitialized interface anymore. UnInitIF interface{} = nil )
Functions ¶
func ConvertToFloatNum ¶
func ConvertToIntNum ¶
func IsFloatNum ¶
func IsFloatNum(x interface{}) bool
func ReCallItfc ¶
func ReCallItfc(retry int, method interface{}, params ...interface{}) interface{}
*
@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 TypeEqualValueEqual(x, y interface{}) bool
func TypeEqualValueGreater ¶
func TypeEqualValueGreater(x, y interface{}) bool
func TypeEqualValueGreaterOrEqual ¶
func TypeEqualValueGreaterOrEqual(x, y interface{}) bool
func TypeEqualValueLess ¶
func TypeEqualValueLess(x, y interface{}) bool
func TypeEqualValueLessOrEqual ¶
func TypeEqualValueLessOrEqual(x, y interface{}) bool
Types ¶
type CommonFunc ¶
type CommonFunc struct{}
func (*CommonFunc) Merge2 ¶
func (c *CommonFunc) Merge2(s ...[]interface{}) (result []interface{})
Click to show internal directories.
Click to hide internal directories.