Documentation
¶
Index ¶
- Variables
- func Avg(input interface{}) (num float64, err error)
- func Chain(input interface{}) *lodash
- func CheckKindErr(funcName string, isChain bool, outputKind string, inputKind string) error
- func Chunk(output interface{}, input interface{}, sliceNum int) (err error)
- func Concat(output interface{}, inputs ...interface{}) (err error)
- func Difference(output interface{}, input interface{}, accessory interface{}) (err error)
- func Every(input interface{}, iteratee func(interface{}) bool) bool
- func Filter(output interface{}, input interface{}, iteratee func(interface{}) bool) (err error)
- func Find(output interface{}, input interface{}, iteratee func(interface{}) bool) (err error)
- func First(output interface{}, input interface{}) (err error)
- func Flatten(output interface{}, input interface{}, level int) (err error)
- func ForEach(input interface{}, iteratee func(interface{})) (err error)
- func GroupBy(output interface{}, input interface{}, ...) (err error)
- func Includes(input interface{}, checkValue interface{}) bool
- func IncludesBy(input interface{}, iteratee func(interface{}) bool) bool
- func IndexOf(input interface{}, iteratee func(interface{}) bool) int
- func Join(output interface{}, input interface{}, joinStr string) (err error)
- func Last(output interface{}, input interface{}) (err error)
- func LastIndexOf(input interface{}, iteratee func(interface{}) bool) int
- func Map(output interface{}, input interface{}, iteratee func(interface{}) interface{}) (err error)
- func Max(input interface{}) (num float64, err error)
- func Min(input interface{}) (num float64, err error)
- func Order(output interface{}, input interface{}, keys []string, orders []string) (err error)
- func OrderBy(output interface{}, input interface{}, ...) (err error)
- func OrderByLess(less ...LessFunc) *multiSorter
- func Reverse(output interface{}, input interface{}) (err error)
- func Sort(output interface{}, input interface{}, key string, order string) (err error)
- func SortBy(output interface{}, input interface{}, ...) (err error)
- func Sum(input interface{}) (num float64, err error)
- func Union(output interface{}, inputs ...interface{})
- func UnionBy(output interface{}, iteratee func(interface{}) interface{}, ...)
- func Uniq(output interface{}, input interface{}) (err error)
- func UniqBy(output interface{}, input interface{}, iteratee func(interface{}) interface{}) (err error)
- type GroupByItem
- type GroupByRes
- type LessFunc
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = errors.New("record not found") ErrNotImplemented = errors.New("not implemented") ErrInvalidData = errors.New("invalid data") ErrInvalidField = errors.New("invalid field") ErrInvalidValue = errors.New("invalid value") )
var ReflectArrayTypes = []string{`array`, `slice`, `map`}
var ReflectFloatTypes = []string{`float32`, `float64`}
var ReflectIntTypes = []string{`int`, `int8`, `int16`, `int32`, `int64`}
Reflect Types Bool: "bool", Int: "int", Int8: "int8", Int16: "int16", Int32: "int32", Int64: "int64", Uint: "uint", Uint8: "uint8", Uint16: "uint16", Uint32: "uint32", Uint64: "uint64", Uintptr: "uintptr", Float32: "float32", Float64: "float64", Complex64: "complex64", Complex128: "complex128", Array: "array", Chan: "chan", Func: "func", Interface: "interface", Map: "map", Ptr: "ptr", Slice: "slice", String: "string", Struct: "struct", UnsafePointer: "unsafe.Pointer",
var ReflectUIntTypes = []string{`uint`, `uint8`, `uint16`, `uint32`, `uint64`}
Functions ¶
func CheckKindErr ¶
func Difference ¶
func Difference(output interface{}, input interface{}, accessory interface{}) (err error)
func GroupBy ¶
func GroupBy(output interface{}, input interface{}, iteratee func(interface{}) (key interface{})) (err error)
output type must like []groupByObj.
func IncludesBy ¶
func LastIndexOf ¶
func Map ¶
func Map(output interface{}, input interface{}, iteratee func(interface{}) interface{}) (err error)
func OrderBy ¶
func OrderBy(output interface{}, input interface{}, valueFunctions []func(interface{}) interface{}, orders []string) (err error)
OrderBy 适用于复杂类型
func OrderByLess ¶ added in v0.0.12
func OrderByLess(less ...LessFunc) *multiSorter
Types ¶
type GroupByItem ¶ added in v0.0.9
type GroupByItem struct { Key interface{} Values []interface{} }
type GroupByRes ¶ added in v0.0.9
type GroupByRes []GroupByItem