ginterface

package
v0.0.0-...-f3abbe6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertJsonNumberToFloat64Array

func ConvertJsonNumberToFloat64Array(s []interface{}) ([]float64, error)

func Merge

func Merge(s ...[]interface{}) (result []interface{})

func Parse

func Parse(x interface{}) (typeName string, isPointer 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 Type

func Type(x interface{}) string

Types

type CommonFunc

type CommonFunc struct{}

func (*CommonFunc) Merge2

func (c *CommonFunc) Merge2(s ...[]interface{}) (result []interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL