Documentation ¶
Index ¶
- func Contains(slice []interface{}, value interface{}) bool
- func ContainsWith(slice []interface{}, value interface{}, equaller Equaller) bool
- func Count(slice []interface{}, value interface{}) int
- func CountWith(slice []interface{}, value interface{}, equaller Equaller) int
- func Delete(slice []interface{}, value interface{}, n int) []interface{}
- func DeleteAll(slice []interface{}, value interface{}) []interface{}
- func DeleteAllWith(slice []interface{}, value interface{}, equaller Equaller) []interface{}
- func DeleteWith(slice []interface{}, value interface{}, n int, equaller Equaller) []interface{}
- func Diff(s1 []interface{}, s2 []interface{}) []interface{}
- func DiffWith(s1 []interface{}, s2 []interface{}, equaller Equaller) []interface{}
- func Equal(s1 []interface{}, s2 []interface{}) bool
- func EqualWith(s1 []interface{}, s2 []interface{}, equaller Equaller) bool
- func ForEach(slice []interface{}, each func(interface{}))
- func GoForEach(slice []interface{}, each func(interface{}))
- func IndexOf(slice []interface{}, value interface{}) int
- func IndexOfWith(slice []interface{}, value interface{}, equaller Equaller) int
- func Intersection(s1 []interface{}, s2 []interface{}) []interface{}
- func IntersectionWith(s1 []interface{}, s2 []interface{}, equaller Equaller) []interface{}
- func Its(slice []interface{}, model interface{}) interface{}
- func ItsOfByte(slice []interface{}) []byte
- func ItsOfFloat32(slice []interface{}) []float32
- func ItsOfFloat64(slice []interface{}) []float64
- func ItsOfInt(slice []interface{}) []int
- func ItsOfInt16(slice []interface{}) []int16
- func ItsOfInt32(slice []interface{}) []int32
- func ItsOfInt64(slice []interface{}) []int64
- func ItsOfInt8(slice []interface{}) []int8
- func ItsOfRune(slice []interface{}) []rune
- func ItsOfString(slice []interface{}) []string
- func ItsOfUint(slice []interface{}) []uint
- func ItsOfUint16(slice []interface{}) []uint16
- func ItsOfUint32(slice []interface{}) []uint32
- func ItsOfUint64(slice []interface{}) []uint64
- func ItsOfUint8(slice []interface{}) []uint8
- func ItsToString(slice []interface{}) []string
- func Map(slice []interface{}, mapper func(interface{}) interface{}) []interface{}
- func Reverse(slice []interface{})
- func ReverseNew(slice []interface{}) []interface{}
- func Shuffle(slice []interface{}, source rand.Source)
- func ShuffleNew(slice []interface{}, source rand.Source) []interface{}
- func Sti(slice interface{}) []interface{}
- func ToSet(s []interface{}) []interface{}
- func ToSetWith(slice []interface{}, equaller Equaller) []interface{}
- func Union(s1 []interface{}, s2 []interface{}) []interface{}
- func UnionWith(s1 []interface{}, s2 []interface{}, equaller Equaller) []interface{}
- type Equaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains(slice []interface{}, value interface{}) bool
`Contains` with normal equal.
func ContainsWith ¶
`Contains` with equaller.
func Delete ¶
func Delete(slice []interface{}, value interface{}, n int) []interface{}
`Delete` with normal equal.
func DeleteAll ¶
func DeleteAll(slice []interface{}, value interface{}) []interface{}
`DeleteAll` with normal equal.
func DeleteAllWith ¶
func DeleteAllWith(slice []interface{}, value interface{}, equaller Equaller) []interface{}
`DeleteAll` with equaller.
func DeleteWith ¶
`Delete` with equaller.
func DiffWith ¶
func DiffWith(s1 []interface{}, s2 []interface{}, equaller Equaller) []interface{}
`Diff` with equaller.
func ForEach ¶
func ForEach(slice []interface{}, each func(interface{}))
ForEach each item in slice.
func GoForEach ¶
func GoForEach(slice []interface{}, each func(interface{}))
Use `go` and `WaitGroup` to ForEach the slice concurrently.
func IndexOf ¶
func IndexOf(slice []interface{}, value interface{}) int
`IndexOf` with normal equal.
func IndexOfWith ¶
`IndexOf` with equaller.
func Intersection ¶
func Intersection(s1 []interface{}, s2 []interface{}) []interface{}
`Intersection` with normal equal.
func IntersectionWith ¶
func IntersectionWith(s1 []interface{}, s2 []interface{}, equaller Equaller) []interface{}
`Intersection` with equaller.
func Its ¶
func Its(slice []interface{}, model interface{}) interface{}
Example:
Its([]interface{}{0, 1}, 0).([]int) -> []int{0, 1}
func ItsOfFloat32 ¶
func ItsOfFloat32(slice []interface{}) []float32
func ItsOfFloat64 ¶
func ItsOfFloat64(slice []interface{}) []float64
func ItsOfInt16 ¶
func ItsOfInt16(slice []interface{}) []int16
func ItsOfInt32 ¶
func ItsOfInt32(slice []interface{}) []int32
func ItsOfInt64 ¶
func ItsOfInt64(slice []interface{}) []int64
func ItsOfString ¶
func ItsOfString(slice []interface{}) []string
func ItsOfUint16 ¶
func ItsOfUint16(slice []interface{}) []uint16
func ItsOfUint32 ¶
func ItsOfUint32(slice []interface{}) []uint32
func ItsOfUint64 ¶
func ItsOfUint64(slice []interface{}) []uint64
func ItsOfUint8 ¶
func ItsOfUint8(slice []interface{}) []uint8
func ItsToString ¶
func ItsToString(slice []interface{}) []string
func Map ¶
func Map(slice []interface{}, mapper func(interface{}) interface{}) []interface{}
`Map` a slice and return a new slice.
func ReverseNew ¶
func ReverseNew(slice []interface{}) []interface{}
Reverse the old slice and return a new one.
func ShuffleNew ¶
Shuffle the old slice and return a new one.
func Sti ¶
func Sti(slice interface{}) []interface{}
Example:
Sti([]int{0, 1}) -> []interface{}{0, 1}
func ToSetWith ¶
func ToSetWith(slice []interface{}, equaller Equaller) []interface{}
`ToSet` with equaller.
Types ¶
Click to show internal directories.
Click to hide internal directories.