Documentation ¶
Index ¶
- func Contains(slice []interface{}, value interface{}) bool
- func ContainsG(slice interface{}, value interface{}) bool
- func ContainsWith(slice []interface{}, value interface{}, equaller Equaller) bool
- func ContainsWithG(slice interface{}, value interface{}, equaller Equaller) bool
- func Count(slice []interface{}, value interface{}) int
- func CountG(slice interface{}, value interface{}) int
- func CountWith(slice []interface{}, value interface{}, equaller Equaller) int
- func CountWithG(slice interface{}, value interface{}, equaller Equaller) int
- func Delete(slice []interface{}, value interface{}, n int) []interface{}
- func DeleteAll(slice []interface{}, value interface{}) []interface{}
- func DeleteAllG(slice interface{}, value interface{}) interface{}
- func DeleteAllWith(slice []interface{}, value interface{}, equaller Equaller) []interface{}
- func DeleteAllWithG(slice interface{}, value interface{}, equaller Equaller) interface{}
- func DeleteG(slice interface{}, value interface{}, n int) interface{}
- func DeleteWith(slice []interface{}, value interface{}, n int, equaller Equaller) []interface{}
- func DeleteWithG(slice interface{}, value interface{}, n int, equaller Equaller) interface{}
- func Diff(slice1, slice2 []interface{}) []interface{}
- func DiffG(slice1, slice2 interface{}) interface{}
- func DiffWith(slice1, slice2 []interface{}, equaller Equaller) []interface{}
- func DiffWithG(slice1, slice2 interface{}, equaller Equaller) interface{}
- func ElementMatch(slice1, slice2 []interface{}) bool
- func ElementMatchG(slice1, slice2 interface{}) bool
- func ElementMatchWith(slice1, slice2 []interface{}, equaller Equaller) bool
- func ElementMatchWithG(slice1, slice2 interface{}, equaller Equaller) bool
- func IndexOf(slice []interface{}, value interface{}) int
- func IndexOfG(slice interface{}, value interface{}) int
- func IndexOfWith(slice []interface{}, value interface{}, equaller Equaller) int
- func IndexOfWithG(slice interface{}, value interface{}, equaller Equaller) int
- func Intersection(slice1, slice2 []interface{}) []interface{}
- func IntersectionG(slice1, slice2 interface{}) interface{}
- func IntersectionWith(slice1, slice2 []interface{}, equaller Equaller) []interface{}
- func IntersectionWithG(slice1, slice2 interface{}, equaller Equaller) interface{}
- func Range(min, max, step int) []int
- func Reverse(slice []interface{}) []interface{}
- func ReverseG(slice interface{}) interface{}
- func ReverseRange(min, max, step int) []int
- func ReverseSelf(slice []interface{})
- func ReverseSelfG(slice interface{})
- func Shuffle(slice []interface{}) []interface{}
- func ShuffleG(slice interface{}) interface{}
- func ShuffleSelf(slice []interface{})
- func ShuffleSelfG(slice interface{})
- func Sort(slice []interface{}, less Lesser) []interface{}
- func SortG(slice interface{}, less Lesser) interface{}
- func SortSelf(slice []interface{}, less Lesser)
- func SortSelfG(slice interface{}, less Lesser)
- func StableSort(slice []interface{}, less Lesser) []interface{}
- func StableSortG(slice interface{}, less Lesser) interface{}
- func StableSortSelf(slice []interface{}, less Lesser)
- func StableSortSelfG(slice interface{}, less Lesser)
- func ToSet(slice []interface{}) []interface{}
- func ToSetG(slice interface{}) interface{}
- func ToSetWith(slice []interface{}, equaller Equaller) []interface{}
- func ToSetWithG(slice interface{}, equaller Equaller) interface{}
- func Union(slice1, slice2 []interface{}) []interface{}
- func UnionG(slice1, slice2 interface{}) interface{}
- func UnionWith(slice1, slice2 []interface{}, equaller Equaller) []interface{}
- func UnionWithG(slice1, slice2 interface{}, equaller Equaller) interface{}
- type Equaller
- type Lesser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains(slice []interface{}, value interface{}) bool
Contains returns true if value is in the []interface{} slice.
func ContainsG ¶ added in v1.5.0
func ContainsG(slice interface{}, value interface{}) bool
Contains returns true if value is in the []T slice, is the generic function of Contains.
func ContainsWith ¶
ContainsWith returns true if value is in the []interface{} slice with Equaller.
func ContainsWithG ¶ added in v1.5.0
ContainsWith returns true if value is in the []T slice with Equaller, is the generic function of ContainsWith.
func Count ¶
func Count(slice []interface{}, value interface{}) int
Count returns the count of value in the []interface{} slice.
func CountG ¶ added in v1.5.0
func CountG(slice interface{}, value interface{}) int
CountG returns the count of value in the []T slice, is the generic function of Count.
func CountWithG ¶ added in v1.5.0
CountWithG returns the count of value in the []T slice with Equaller, is the generic function of CountWith.
func Delete ¶
func Delete(slice []interface{}, value interface{}, n int) []interface{}
Delete deletes value from []interface{} slice in n times.
func DeleteAll ¶
func DeleteAll(slice []interface{}, value interface{}) []interface{}
DeleteAll deletes value from []interface{} slice in all.
func DeleteAllG ¶ added in v1.5.0
func DeleteAllG(slice interface{}, value interface{}) interface{}
DeleteAllG deletes value from []T slice in all, is the generic function of DeleteAll.
func DeleteAllWith ¶
func DeleteAllWith(slice []interface{}, value interface{}, equaller Equaller) []interface{}
DeleteAllWith deletes value from []interface{} slice in all with Equaller.
func DeleteAllWithG ¶ added in v1.5.0
func DeleteAllWithG(slice interface{}, value interface{}, equaller Equaller) interface{}
DeleteAllWithG deletes value from []T slice in all with Equaller, is the generic function of DeleteAllWith.
func DeleteG ¶ added in v1.5.0
func DeleteG(slice interface{}, value interface{}, n int) interface{}
DeleteG deletes value from []T slice in n times, is the generic function of Delete.
func DeleteWith ¶
DeleteWith deletes value from []interface{} slice in n times with Equaller.
func DeleteWithG ¶ added in v1.5.0
DeleteWithG deletes value from []T slice in n times with Equaller, is the generic function of DeleteWith.
func Diff ¶
func Diff(slice1, slice2 []interface{}) []interface{}
Diff returns the difference of two []interface{} slices.
func DiffG ¶ added in v1.5.0
func DiffG(slice1, slice2 interface{}) interface{}
DiffG returns the difference of two []T slices, is the generic function of Diff.
func DiffWith ¶
func DiffWith(slice1, slice2 []interface{}, equaller Equaller) []interface{}
DiffWith returns the difference of two []interface{} slices with Equaller.
func DiffWithG ¶ added in v1.5.0
func DiffWithG(slice1, slice2 interface{}, equaller Equaller) interface{}
DiffWithG returns the difference of two []T slices with Equaller, is the generic function of DiffWith.
func ElementMatch ¶ added in v1.5.0
func ElementMatch(slice1, slice2 []interface{}) bool
ElementMatch checks if two []interface{} slice equal without order.
func ElementMatchG ¶ added in v1.5.0
func ElementMatchG(slice1, slice2 interface{}) bool
ElementMatch checks if two []T slice equal without order, is the generic function of ElementMatch.
func ElementMatchWith ¶ added in v1.5.0
ElementMatchWith checks if two []interface{} slice equal without order with Equaller.
func ElementMatchWithG ¶ added in v1.5.0
ElementMatchWith checks if two []T slice equal without order with Equaller, is the generic function of ElementMatchWith.
func IndexOf ¶
func IndexOf(slice []interface{}, value interface{}) int
IndexOf returns the first index of value in the []interface{} slice.
func IndexOfG ¶ added in v1.5.0
func IndexOfG(slice interface{}, value interface{}) int
IndexOfG returns the first index of value in the []T slice, is the generic function of IndexOf.
func IndexOfWith ¶
IndexOfWith returns the first index of value in the []interface{} slice with Equaller.
func IndexOfWithG ¶ added in v1.5.0
IndexOfWithG returns the first index of value in the []T slice with Equaller, is the generic function of IndexOfWith.
func Intersection ¶
func Intersection(slice1, slice2 []interface{}) []interface{}
Intersection returns the intersection of two []interface{} slices.
func IntersectionG ¶ added in v1.5.0
func IntersectionG(slice1, slice2 interface{}) interface{}
IntersectionG returns the intersection of two []T slices, is the generic function of Intersection.
func IntersectionWith ¶
func IntersectionWith(slice1, slice2 []interface{}, equaller Equaller) []interface{}
IntersectionWith returns the intersection of two []interface{} slices with Equaller.
func IntersectionWithG ¶ added in v1.5.0
func IntersectionWithG(slice1, slice2 interface{}, equaller Equaller) interface{}
IntersectionWithG returns the intersection of two []T slices with Equaller, is the generic function of IntersectionWith.
func Reverse ¶
func Reverse(slice []interface{}) []interface{}
Reverse reverses the []interface{} slice and returns the result.
func ReverseG ¶ added in v1.5.0
func ReverseG(slice interface{}) interface{}
ReverseG reverses the []T slice and returns the result, is the generic function of Reverse.
func ReverseRange ¶ added in v1.4.1
ReverseRange generates a reverse []int slice from max index to min index with step.
func ReverseSelf ¶ added in v1.5.0
func ReverseSelf(slice []interface{})
ReverseSelf reverses the []interface{} slice directly.
func ReverseSelfG ¶ added in v1.5.0
func ReverseSelfG(slice interface{})
ReverseSelfG reverses the []T slice directly, is the generic function of ReverseSelf.
func Shuffle ¶
func Shuffle(slice []interface{}) []interface{}
Shuffle shuffles the []interface{} slice and returns the result.
func ShuffleG ¶ added in v1.5.0
func ShuffleG(slice interface{}) interface{}
ShuffleG shuffles the []T slice and returns the result, is the generic function of Shuffle.
func ShuffleSelf ¶ added in v1.5.0
func ShuffleSelf(slice []interface{})
ShuffleSelf shuffles the []interface{} slice directly.
func ShuffleSelfG ¶ added in v1.5.0
func ShuffleSelfG(slice interface{})
ShuffleSelfG shuffles the []T slice directly, is the generic function of ShuffleSelf.
func Sort ¶ added in v1.4.1
func Sort(slice []interface{}, less Lesser) []interface{}
Sort sorts the []interface{} slice with less function and returns the result.
func SortG ¶ added in v1.5.0
func SortG(slice interface{}, less Lesser) interface{}
SortG sorts the []T slice with less function and returns the result, is the generic function of Sort.
func SortSelf ¶ added in v1.5.0
func SortSelf(slice []interface{}, less Lesser)
SortSelf sorts the []interface{} slice with less function directly.
func SortSelfG ¶ added in v1.5.0
func SortSelfG(slice interface{}, less Lesser)
SortSelfG sorts the []T slice with less function directly, is the generic function of SortSelf.
func StableSort ¶ added in v1.4.1
func StableSort(slice []interface{}, less Lesser) []interface{}
StableSort sorts the []interface{} slice in stable with less function and returns the result.
func StableSortG ¶ added in v1.5.0
func StableSortG(slice interface{}, less Lesser) interface{}
StableSortG sorts the []T slice with in stable less function and returns the result, is the generic function of StableSort.
func StableSortSelf ¶ added in v1.5.0
func StableSortSelf(slice []interface{}, less Lesser)
StableSortSelf sorts the []interface{} slice in stable with less function directly.
func StableSortSelfG ¶ added in v1.5.0
func StableSortSelfG(slice interface{}, less Lesser)
StableSortSelfG sorts the []T slice in stable with less function directly, is the generic function of StableSortSelf.
func ToSet ¶
func ToSet(slice []interface{}) []interface{}
ToSet removes the duplicate items from []interface{} slice as a set.
func ToSetG ¶ added in v1.5.0
func ToSetG(slice interface{}) interface{}
ToSet removes the duplicate items from []T slice as a set, is the generic function of ToSet.
func ToSetWith ¶
func ToSetWith(slice []interface{}, equaller Equaller) []interface{}
ToSetWith removes the duplicate items from []interface{} slice as a set with Equaller.
func ToSetWithG ¶ added in v1.5.0
func ToSetWithG(slice interface{}, equaller Equaller) interface{}
ToSetWith removes the duplicate items from []T slice as a set with Equaller, is the generic function of ToSetWith.
func Union ¶
func Union(slice1, slice2 []interface{}) []interface{}
Union returns the union of two []interface{} slices.
func UnionG ¶ added in v1.5.0
func UnionG(slice1, slice2 interface{}) interface{}
UnionG returns the union of two []T slices, is the generic function of Union.
func UnionWith ¶
func UnionWith(slice1, slice2 []interface{}, equaller Equaller) []interface{}
UnionWith returns the union of two []interface{} slices with Equaller.
func UnionWithG ¶ added in v1.5.0
func UnionWithG(slice1, slice2 interface{}, equaller Equaller) interface{}
UnionWithG returns the union of two []T slices with Equaller, is the generic function of UnionWith.