Versions in this module Expand all Collapse all v1 v1.3.3 Mar 1, 2021 Changes in this version + type AbsCollection struct + Parent ICollection + func (arr *AbsCollection) Append(item interface{}) ICollection + func (arr *AbsCollection) Avg() IMix + func (arr *AbsCollection) Contains(obj interface{}) bool + func (arr *AbsCollection) ContainsCount(obj interface{}) int + func (arr *AbsCollection) Copy() ICollection + func (arr *AbsCollection) Count() int + func (arr *AbsCollection) DD() + func (arr *AbsCollection) Diff(arr2 ICollection) ICollection + func (arr *AbsCollection) Each(f func(item interface{}, key int)) + func (arr *AbsCollection) Err() error + func (arr *AbsCollection) Every(f func(item interface{}, key int) bool) bool + func (arr *AbsCollection) Filter(f func(obj interface{}, index int) bool) ICollection + func (arr *AbsCollection) First(f ...func(obj interface{}, index int) bool) IMix + func (arr *AbsCollection) ForPage(page int, perPage int) ICollection + func (arr *AbsCollection) FromJson(data []byte) error + func (arr *AbsCollection) GetCompare() func(a interface{}, b interface{}) int + func (arr *AbsCollection) Index(i int) IMix + func (arr *AbsCollection) Insert(index int, obj interface{}) ICollection + func (arr *AbsCollection) IsEmpty() bool + func (arr *AbsCollection) IsNotEmpty() bool + func (arr *AbsCollection) Join(split string, format ...func(item interface{}) string) string + func (arr *AbsCollection) Last(fs ...func(item interface{}, key int) bool) IMix + func (arr *AbsCollection) Map(f func(item interface{}, key int) interface{}) ICollection + func (arr *AbsCollection) MarshalJSON() ([]byte, error) + func (arr *AbsCollection) Max() IMix + func (arr *AbsCollection) Median() IMix + func (arr *AbsCollection) Merge(arr2 ICollection) ICollection + func (arr *AbsCollection) Min() IMix + func (arr *AbsCollection) Mode() IMix + func (arr *AbsCollection) NewEmpty(err ...error) ICollection + func (arr *AbsCollection) Nth(n int, offset int) ICollection + func (arr *AbsCollection) Pad(count int, def interface{}) ICollection + func (arr *AbsCollection) Pluck(key string) ICollection + func (arr *AbsCollection) Pop() IMix + func (arr *AbsCollection) Prepend(item interface{}) ICollection + func (arr *AbsCollection) Push(item interface{}) ICollection + func (arr *AbsCollection) Random() IMix + func (arr *AbsCollection) Reduce(f func(carry IMix, item IMix) IMix) IMix + func (arr *AbsCollection) Reject(f func(item interface{}, key int) bool) ICollection + func (arr *AbsCollection) Remove(index int) ICollection + func (arr *AbsCollection) Reverse() ICollection + func (arr *AbsCollection) Search(item interface{}) int + func (arr *AbsCollection) SetCompare(compare func(a interface{}, b interface{}) int) ICollection + func (arr *AbsCollection) SetErr(err error) ICollection + func (arr *AbsCollection) SetIndex(i int, val interface{}) ICollection + func (arr *AbsCollection) Shuffle() ICollection + func (arr *AbsCollection) Slice(ps ...int) ICollection + func (arr *AbsCollection) Sort() ICollection + func (arr *AbsCollection) SortBy(key string) ICollection + func (arr *AbsCollection) SortByDesc(key string) ICollection + func (arr *AbsCollection) SortDesc() ICollection + func (arr *AbsCollection) Sum() IMix + func (arr *AbsCollection) ToFloat32s() ([]float32, error) + func (arr *AbsCollection) ToFloat64s() ([]float64, error) + func (arr *AbsCollection) ToInt32s() ([]int32, error) + func (arr *AbsCollection) ToInt64s() ([]int64, error) + func (arr *AbsCollection) ToInterfaces() ([]interface{}, error) + func (arr *AbsCollection) ToInts() ([]int, error) + func (arr *AbsCollection) ToJson() ([]byte, error) + func (arr *AbsCollection) ToMixs() ([]IMix, error) + func (arr *AbsCollection) ToObjs(objs interface{}) error + func (arr *AbsCollection) ToStrings() ([]string, error) + func (arr *AbsCollection) Unique() ICollection + func (arr *AbsCollection) UnmarshalJSON(data []byte) error + type EleType int + const TYPE_FLOAT32 + const TYPE_FLOAT64 + const TYPE_OBJ + const TYPE_OBJ_POINT + const TYPE_STRING + const TYPE_UNKNWON + const Type_INT + const Type_INT32 + const Type_INT64 + type Float32Collection struct + func NewFloat32Collection(objs []float32) *Float32Collection + func (arr *Float32Collection) Copy() ICollection + func (arr *Float32Collection) Count() int + func (arr *Float32Collection) DD() + func (arr *Float32Collection) FromJson(data []byte) error + func (arr *Float32Collection) Index(i int) IMix + func (arr *Float32Collection) Insert(index int, obj interface{}) ICollection + func (arr *Float32Collection) NewEmpty(err ...error) ICollection + func (arr *Float32Collection) Remove(i int) ICollection + func (arr *Float32Collection) SetIndex(i int, val interface{}) ICollection + func (arr *Float32Collection) ToJson() ([]byte, error) + type Float64Collection struct + func NewFloat64Collection(objs []float64) *Float64Collection + func (arr *Float64Collection) Copy() ICollection + func (arr *Float64Collection) Count() int + func (arr *Float64Collection) DD() + func (arr *Float64Collection) FromJson(data []byte) error + func (arr *Float64Collection) Index(i int) IMix + func (arr *Float64Collection) Insert(index int, obj interface{}) ICollection + func (arr *Float64Collection) NewEmpty(err ...error) ICollection + func (arr *Float64Collection) Remove(i int) ICollection + func (arr *Float64Collection) SetIndex(i int, val interface{}) ICollection + func (arr *Float64Collection) ToJson() ([]byte, error) + type ICollection interface + Append func(item interface{}) ICollection + Avg func() IMix + Contains func(obj interface{}) bool + ContainsCount func(obj interface{}) int + Copy func() ICollection + Count func() int + DD func() + Diff func(arr ICollection) ICollection + Each func(func(item interface{}, key int)) + Err func() error + Every func(func(item interface{}, key int) bool) bool + Filter func(func(item interface{}, key int) bool) ICollection + First func(...func(item interface{}, key int) bool) IMix + ForPage func(page int, perPage int) ICollection + FromJson func([]byte) error + GetCompare func() func(a interface{}, b interface{}) int + Index func(i int) IMix + Insert func(index int, item interface{}) ICollection + IsEmpty func() bool + IsNotEmpty func() bool + Join func(split string, format ...func(item interface{}) string) string + Last func(...func(item interface{}, key int) bool) IMix + Map func(func(item interface{}, key int) interface{}) ICollection + Max func() IMix + Median func() IMix + Merge func(arr ICollection) ICollection + Min func() IMix + Mode func() IMix + NewEmpty func(err ...error) ICollection + Nth func(n int, offset int) ICollection + Pad func(count int, def interface{}) ICollection + Pluck func(key string) ICollection + Pop func() IMix + Prepend func(item interface{}) ICollection + Push func(item interface{}) ICollection + Random func() IMix + Reduce func(func(carry IMix, item IMix) IMix) IMix + Reject func(func(item interface{}, key int) bool) ICollection + Remove func(index int) ICollection + Reverse func() ICollection + Search func(item interface{}) int + SetCompare func(func(a interface{}, b interface{}) int) ICollection + SetErr func(error) ICollection + SetIndex func(i int, val interface{}) ICollection + Shuffle func() ICollection + Slice func(...int) ICollection + Sort func() ICollection + SortBy func(key string) ICollection + SortByDesc func(key string) ICollection + SortDesc func() ICollection + Sum func() IMix + ToFloat32s func() ([]float32, error) + ToFloat64s func() ([]float64, error) + ToInt32s func() ([]int32, error) + ToInt64s func() ([]int64, error) + ToInterfaces func() ([]interface{}, error) + ToInts func() ([]int, error) + ToJson func() ([]byte, error) + ToMixs func() ([]IMix, error) + ToObjs func(interface{}) error + ToStrings func() ([]string, error) + Unique func() ICollection + func NewEmptyMixCollection() ICollection + func NewMixCollection(typ reflect.Type) ICollection + type IMix interface + Add func(mix IMix) (IMix, error) + Compare func(n IMix) (int, error) + DD func() + Div func(n int) (IMix, error) + Err func() error + Format func() string + Multi func(n int) (IMix, error) + MustToFloat32 func() float32 + MustToFloat64 func() float64 + MustToInt func() int + MustToInt32 func() int32 + MustToInt64 func() int64 + MustToInterface func() interface{} + MustToString func() string + RemoveFields func(...string) IMix + SetCompare func(func(a interface{}, b interface{}) int) IMix + SetErr func(err error) IMix + SetField func(key string, val interface{}) IMix + Sub func(mix IMix) (IMix, error) + ToFloat32 func() (float32, error) + ToFloat64 func() (float64, error) + ToInt func() (int, error) + ToInt32 func() (int32, error) + ToInt64 func() (int64, error) + ToInterface func() (interface{}, error) + ToString func() (string, error) + Type func() reflect.Type + type Int32Collection struct + func NewInt32Collection(objs []int32) *Int32Collection + func (arr *Int32Collection) Copy() ICollection + func (arr *Int32Collection) Count() int + func (arr *Int32Collection) DD() + func (arr *Int32Collection) FromJson(data []byte) error + func (arr *Int32Collection) Index(i int) IMix + func (arr *Int32Collection) Insert(index int, obj interface{}) ICollection + func (arr *Int32Collection) NewEmpty(err ...error) ICollection + func (arr *Int32Collection) Remove(i int) ICollection + func (arr *Int32Collection) SetIndex(i int, val interface{}) ICollection + func (arr *Int32Collection) ToJson() ([]byte, error) + type Int64Collection struct + func NewInt64Collection(objs []int64) *Int64Collection + func (arr *Int64Collection) Copy() ICollection + func (arr *Int64Collection) Count() int + func (arr *Int64Collection) DD() + func (arr *Int64Collection) FromJson(data []byte) error + func (arr *Int64Collection) Index(i int) IMix + func (arr *Int64Collection) Insert(index int, obj interface{}) ICollection + func (arr *Int64Collection) NewEmpty(err ...error) ICollection + func (arr *Int64Collection) Remove(i int) ICollection + func (arr *Int64Collection) SetIndex(i int, val interface{}) ICollection + func (arr *Int64Collection) ToJson() ([]byte, error) + type IntCollection struct + func NewIntCollection(objs []int) *IntCollection + func (arr *IntCollection) Copy() ICollection + func (arr *IntCollection) Count() int + func (arr *IntCollection) DD() + func (arr *IntCollection) FromJson(data []byte) error + func (arr *IntCollection) Index(i int) IMix + func (arr *IntCollection) Insert(index int, obj interface{}) ICollection + func (arr *IntCollection) NewEmpty(err ...error) ICollection + func (arr *IntCollection) Remove(i int) ICollection + func (arr *IntCollection) SetIndex(i int, val interface{}) ICollection + func (arr *IntCollection) ToJson() ([]byte, error) + type Mix struct + func NewEmptyMix() *Mix + func NewErrorMix(err error) *Mix + func NewMix(real interface{}) *Mix + func (m *Mix) Add(n IMix) (IMix, error) + func (m *Mix) Compare(n IMix) (ret int, err error) + func (m *Mix) DD() + func (m *Mix) Div(n int) (IMix, error) + func (m *Mix) Err() error + func (m *Mix) Format() string + func (m *Mix) MarshalJSON() ([]byte, error) + func (m *Mix) Multi(n int) (IMix, error) + func (m *Mix) MustToFloat32() float32 + func (m *Mix) MustToFloat64() float64 + func (m *Mix) MustToInt() int + func (m *Mix) MustToInt32() int32 + func (m *Mix) MustToInt64() int64 + func (m *Mix) MustToInterface() interface{} + func (m *Mix) MustToString() string + func (m *Mix) RemoveFields(key ...string) IMix + func (m *Mix) SetCompare(compare func(a interface{}, b interface{}) int) IMix + func (m *Mix) SetErr(err error) IMix + func (m *Mix) SetField(key string, val interface{}) IMix + func (m *Mix) Sub(n IMix) (IMix, error) + func (m *Mix) ToFloat32() (float32, error) + func (m *Mix) ToFloat64() (float64, error) + func (m *Mix) ToInt() (int, error) + func (m *Mix) ToInt32() (int32, error) + func (m *Mix) ToInt64() (int64, error) + func (m *Mix) ToInterface() (interface{}, error) + func (m *Mix) ToString() (string, error) + func (m *Mix) Type() reflect.Type + type ObjCollection struct + func NewObjCollection(objs interface{}) *ObjCollection + func NewObjCollectionByType(typ reflect.Type) *ObjCollection + func (arr *ObjCollection) Copy() ICollection + func (arr *ObjCollection) Count() int + func (arr *ObjCollection) DD() + func (arr *ObjCollection) FromJson(data []byte) error + func (arr *ObjCollection) Index(i int) IMix + func (arr *ObjCollection) Insert(index int, obj interface{}) ICollection + func (arr *ObjCollection) NewEmpty(err ...error) ICollection + func (arr *ObjCollection) Pluck(key string) ICollection + func (arr *ObjCollection) Remove(i int) ICollection + func (arr *ObjCollection) SetIndex(i int, val interface{}) ICollection + func (arr *ObjCollection) SortBy(key string) ICollection + func (arr *ObjCollection) SortByDesc(key string) ICollection + func (arr *ObjCollection) ToJson() ([]byte, error) + func (arr *ObjCollection) ToObjs(objs interface{}) error + type ObjPointCollection struct + func NewObjPointCollection(objs interface{}) *ObjPointCollection + func (arr *ObjPointCollection) Copy() ICollection + func (arr *ObjPointCollection) Count() int + func (arr *ObjPointCollection) DD() + func (arr *ObjPointCollection) FromJson(data []byte) error + func (arr *ObjPointCollection) Index(i int) IMix + func (arr *ObjPointCollection) Insert(index int, obj interface{}) ICollection + func (arr *ObjPointCollection) NewEmpty(err ...error) ICollection + func (arr *ObjPointCollection) Pluck(key string) ICollection + func (arr *ObjPointCollection) Remove(i int) ICollection + func (arr *ObjPointCollection) SetIndex(i int, val interface{}) ICollection + func (arr *ObjPointCollection) SortBy(key string) ICollection + func (arr *ObjPointCollection) SortByDesc(key string) ICollection + func (arr *ObjPointCollection) ToJson() ([]byte, error) + func (arr *ObjPointCollection) ToObjs(objs interface{}) error + type StrCollection struct + func NewStrCollection(objs []string) *StrCollection + func (arr *StrCollection) Copy() ICollection + func (arr *StrCollection) Count() int + func (arr *StrCollection) DD() + func (arr *StrCollection) FromJson(data []byte) error + func (arr *StrCollection) Index(i int) IMix + func (arr *StrCollection) Insert(index int, obj interface{}) ICollection + func (arr *StrCollection) NewEmpty(err ...error) ICollection + func (arr *StrCollection) Remove(i int) ICollection + func (arr *StrCollection) SetIndex(i int, val interface{}) ICollection + func (arr *StrCollection) ToJson() ([]byte, error)