Documentation ¶
Index ¶
- Constants
- type Float32Slice
- func (slice Float32Slice) Chunk(size int) [][]float32
- func (slice Float32Slice) Contains(needle float32) bool
- func (slice Float32Slice) Each(f func(float32))
- func (slice Float32Slice) Filter(f func(float32) bool) Float32Slice
- func (slice Float32Slice) IfEach(f func(float32) bool) (int, bool)
- func (slice Float32Slice) IndexOf(needle float32) int
- func (slice Float32Slice) Map(f func(float32) float32)
- func (slice Float32Slice) Reverse() Float32Slice
- func (slice Float32Slice) SortAsc() Float32Slice
- func (slice Float32Slice) SortDesc() Float32Slice
- func (slice Float32Slice) TryEach(f func(float32) error) (int, error)
- func (slice Float32Slice) Unique() Float32Slice
- func (slice Float32Slice) Value() []float32
- type Float64Slice
- func (slice Float64Slice) Chunk(size int) [][]float64
- func (slice Float64Slice) Contains(needle float64) bool
- func (slice Float64Slice) Each(f func(float64))
- func (slice Float64Slice) Filter(f func(float64) bool) Float64Slice
- func (slice Float64Slice) IfEach(f func(float64) bool) (int, bool)
- func (slice Float64Slice) IndexOf(needle float64) int
- func (slice Float64Slice) Map(f func(float64) float64)
- func (slice Float64Slice) Reverse() Float64Slice
- func (slice Float64Slice) SortAsc() Float64Slice
- func (slice Float64Slice) SortDesc() Float64Slice
- func (slice Float64Slice) TryEach(f func(float64) error) (int, error)
- func (slice Float64Slice) Unique() Float64Slice
- func (slice Float64Slice) Value() []float64
- type Int16Slice
- func (slice Int16Slice) Chunk(size int) [][]int16
- func (slice Int16Slice) Contains(needle int16) bool
- func (slice Int16Slice) Each(f func(int16))
- func (slice Int16Slice) Filter(f func(int16) bool) Int16Slice
- func (slice Int16Slice) IfEach(f func(int16) bool) (int, bool)
- func (slice Int16Slice) IndexOf(needle int16) int
- func (slice Int16Slice) Map(f func(int16) int16)
- func (slice Int16Slice) Reverse() Int16Slice
- func (slice Int16Slice) SortAsc() Int16Slice
- func (slice Int16Slice) SortDesc() Int16Slice
- func (slice Int16Slice) TryEach(f func(int16) error) (int, error)
- func (slice Int16Slice) Unique() Int16Slice
- func (slice Int16Slice) Value() []int16
- type Int32Slice
- func (slice Int32Slice) Chunk(size int) [][]int32
- func (slice Int32Slice) Contains(needle int32) bool
- func (slice Int32Slice) Each(f func(int32))
- func (slice Int32Slice) Filter(f func(int32) bool) Int32Slice
- func (slice Int32Slice) IfEach(f func(int32) bool) (int, bool)
- func (slice Int32Slice) IndexOf(needle int32) int
- func (slice Int32Slice) Map(f func(int32) int32)
- func (slice Int32Slice) Reverse() Int32Slice
- func (slice Int32Slice) SortAsc() Int32Slice
- func (slice Int32Slice) SortDesc() Int32Slice
- func (slice Int32Slice) TryEach(f func(int32) error) (int, error)
- func (slice Int32Slice) Unique() Int32Slice
- func (slice Int32Slice) Value() []int32
- type Int64Slice
- func (slice Int64Slice) Chunk(size int) [][]int64
- func (slice Int64Slice) Contains(needle int64) bool
- func (slice Int64Slice) Each(f func(int64))
- func (slice Int64Slice) Filter(f func(int64) bool) Int64Slice
- func (slice Int64Slice) IfEach(f func(int64) bool) (int, bool)
- func (slice Int64Slice) IndexOf(needle int64) int
- func (slice Int64Slice) Map(f func(int64) int64)
- func (slice Int64Slice) Reverse() Int64Slice
- func (slice Int64Slice) SortAsc() Int64Slice
- func (slice Int64Slice) SortDesc() Int64Slice
- func (slice Int64Slice) TryEach(f func(int64) error) (int, error)
- func (slice Int64Slice) Unique() Int64Slice
- func (slice Int64Slice) Value() []int64
- type Int8Slice
- func (slice Int8Slice) Chunk(size int) [][]int8
- func (slice Int8Slice) Contains(needle int8) bool
- func (slice Int8Slice) Each(f func(int8))
- func (slice Int8Slice) Filter(f func(int8) bool) Int8Slice
- func (slice Int8Slice) IfEach(f func(int8) bool) (int, bool)
- func (slice Int8Slice) IndexOf(needle int8) int
- func (slice Int8Slice) Map(f func(int8) int8)
- func (slice Int8Slice) Reverse() Int8Slice
- func (slice Int8Slice) SortAsc() Int8Slice
- func (slice Int8Slice) SortDesc() Int8Slice
- func (slice Int8Slice) TryEach(f func(int8) error) (int, error)
- func (slice Int8Slice) Unique() Int8Slice
- func (slice Int8Slice) Value() []int8
- type IntSlice
- func (slice IntSlice) Chunk(size int) [][]int
- func (slice IntSlice) Contains(needle int) bool
- func (slice IntSlice) Each(f func(int))
- func (slice IntSlice) Filter(f func(int) bool) IntSlice
- func (slice IntSlice) IfEach(f func(int) bool) (int, bool)
- func (slice IntSlice) IndexOf(needle int) int
- func (slice IntSlice) Map(f func(int) int)
- func (slice IntSlice) Reverse() IntSlice
- func (slice IntSlice) SortAsc() IntSlice
- func (slice IntSlice) SortDesc() IntSlice
- func (slice IntSlice) TryEach(f func(int) error) (int, error)
- func (slice IntSlice) Unique() IntSlice
- func (slice IntSlice) Value() []int
- type StringSlice
- func (slice StringSlice) Chunk(size int) [][]string
- func (slice StringSlice) Contains(needle string) bool
- func (slice StringSlice) Each(f func(string))
- func (slice StringSlice) Filter(f func(string) bool) StringSlice
- func (slice StringSlice) IfEach(f func(string) bool) (int, bool)
- func (slice StringSlice) IndexOf(needle string) int
- func (slice StringSlice) Map(f func(string) string)
- func (slice StringSlice) Reverse() StringSlice
- func (slice StringSlice) SortAsc() StringSlice
- func (slice StringSlice) SortDesc() StringSlice
- func (slice StringSlice) TryEach(f func(string) error) (int, error)
- func (slice StringSlice) Unique() StringSlice
- func (slice StringSlice) Value() []string
- type UInt16Slice
- func (slice UInt16Slice) Chunk(size int) [][]uint16
- func (slice UInt16Slice) Contains(needle uint16) bool
- func (slice UInt16Slice) Each(f func(uint16))
- func (slice UInt16Slice) Filter(f func(uint16) bool) UInt16Slice
- func (slice UInt16Slice) IfEach(f func(uint16) bool) (int, bool)
- func (slice UInt16Slice) IndexOf(needle uint16) int
- func (slice UInt16Slice) Map(f func(uint16) uint16)
- func (slice UInt16Slice) Reverse() UInt16Slice
- func (slice UInt16Slice) SortAsc() UInt16Slice
- func (slice UInt16Slice) SortDesc() UInt16Slice
- func (slice UInt16Slice) TryEach(f func(uint16) error) (int, error)
- func (slice UInt16Slice) Unique() UInt16Slice
- func (slice UInt16Slice) Value() []uint16
- type UInt32Slice
- func (slice UInt32Slice) Chunk(size int) [][]uint32
- func (slice UInt32Slice) Contains(needle uint32) bool
- func (slice UInt32Slice) Each(f func(uint32))
- func (slice UInt32Slice) Filter(f func(uint32) bool) UInt32Slice
- func (slice UInt32Slice) IfEach(f func(uint32) bool) (int, bool)
- func (slice UInt32Slice) IndexOf(needle uint32) int
- func (slice UInt32Slice) Map(f func(uint32) uint32)
- func (slice UInt32Slice) Reverse() UInt32Slice
- func (slice UInt32Slice) SortAsc() UInt32Slice
- func (slice UInt32Slice) SortDesc() UInt32Slice
- func (slice UInt32Slice) TryEach(f func(uint32) error) (int, error)
- func (slice UInt32Slice) Unique() UInt32Slice
- func (slice UInt32Slice) Value() []uint32
- type UInt64Slice
- func (slice UInt64Slice) Chunk(size int) [][]uint64
- func (slice UInt64Slice) Contains(needle uint64) bool
- func (slice UInt64Slice) Each(f func(uint64))
- func (slice UInt64Slice) Filter(f func(uint64) bool) UInt64Slice
- func (slice UInt64Slice) IfEach(f func(uint64) bool) (int, bool)
- func (slice UInt64Slice) IndexOf(needle uint64) int
- func (slice UInt64Slice) Map(f func(uint64) uint64)
- func (slice UInt64Slice) Reverse() UInt64Slice
- func (slice UInt64Slice) SortAsc() UInt64Slice
- func (slice UInt64Slice) SortDesc() UInt64Slice
- func (slice UInt64Slice) TryEach(f func(uint64) error) (int, error)
- func (slice UInt64Slice) Unique() UInt64Slice
- func (slice UInt64Slice) Value() []uint64
- type UInt8Slice
- func (slice UInt8Slice) Chunk(size int) [][]uint8
- func (slice UInt8Slice) Contains(needle uint8) bool
- func (slice UInt8Slice) Each(f func(uint8))
- func (slice UInt8Slice) Filter(f func(uint8) bool) UInt8Slice
- func (slice UInt8Slice) IfEach(f func(uint8) bool) (int, bool)
- func (slice UInt8Slice) IndexOf(needle uint8) int
- func (slice UInt8Slice) Map(f func(uint8) uint8)
- func (slice UInt8Slice) Reverse() UInt8Slice
- func (slice UInt8Slice) SortAsc() UInt8Slice
- func (slice UInt8Slice) SortDesc() UInt8Slice
- func (slice UInt8Slice) TryEach(f func(uint8) error) (int, error)
- func (slice UInt8Slice) Unique() UInt8Slice
- func (slice UInt8Slice) Value() []uint8
- type UIntPtrSlice
- func (slice UIntPtrSlice) Chunk(size int) [][]uintptr
- func (slice UIntPtrSlice) Contains(needle uintptr) bool
- func (slice UIntPtrSlice) Each(f func(uintptr))
- func (slice UIntPtrSlice) Filter(f func(uintptr) bool) UIntPtrSlice
- func (slice UIntPtrSlice) IfEach(f func(uintptr) bool) (int, bool)
- func (slice UIntPtrSlice) IndexOf(needle uintptr) int
- func (slice UIntPtrSlice) Map(f func(uintptr) uintptr)
- func (slice UIntPtrSlice) Reverse() UIntPtrSlice
- func (slice UIntPtrSlice) SortAsc() UIntPtrSlice
- func (slice UIntPtrSlice) SortDesc() UIntPtrSlice
- func (slice UIntPtrSlice) TryEach(f func(uintptr) error) (int, error)
- func (slice UIntPtrSlice) Unique() UIntPtrSlice
- func (slice UIntPtrSlice) Value() []uintptr
- type UIntSlice
- func (slice UIntSlice) Chunk(size int) [][]uint
- func (slice UIntSlice) Contains(needle uint) bool
- func (slice UIntSlice) Each(f func(uint))
- func (slice UIntSlice) Filter(f func(uint) bool) UIntSlice
- func (slice UIntSlice) IfEach(f func(uint) bool) (int, bool)
- func (slice UIntSlice) IndexOf(needle uint) int
- func (slice UIntSlice) Map(f func(uint) uint)
- func (slice UIntSlice) Reverse() UIntSlice
- func (slice UIntSlice) SortAsc() UIntSlice
- func (slice UIntSlice) SortDesc() UIntSlice
- func (slice UIntSlice) TryEach(f func(uint) error) (int, error)
- func (slice UIntSlice) Unique() UIntSlice
- func (slice UIntSlice) Value() []uint
Constants ¶
const (
// NotInSlice signifies that the searched element is not in a slice
NotInSlice = -1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Float32Slice ¶
type Float32Slice []float32
Float32Slice is the alias of []float32
func (Float32Slice) Chunk ¶ added in v0.0.5
func (slice Float32Slice) Chunk(size int) [][]float32
Chunk will divide the slice of float32 into smaller slices defined by chunk length
func (Float32Slice) Contains ¶
func (slice Float32Slice) Contains(needle float32) bool
Contains returns true if the slice contains needle
func (Float32Slice) Each ¶
func (slice Float32Slice) Each(f func(float32))
Each will apply a function to each float32 in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (Float32Slice) Filter ¶
func (slice Float32Slice) Filter(f func(float32) bool) Float32Slice
Filter will return all float32 values that evaluate true in the user-supplied function
func (Float32Slice) IfEach ¶ added in v0.0.4
func (slice Float32Slice) IfEach(f func(float32) bool) (int, bool)
IfEach will apply a function to each float32 in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (Float32Slice) IndexOf ¶
func (slice Float32Slice) IndexOf(needle float32) int
IndexOf returns the first index of needle, or -1 if not found
func (Float32Slice) Map ¶
func (slice Float32Slice) Map(f func(float32) float32)
Map will apply a function to each float32 in the slice and replace the previous value
func (Float32Slice) Reverse ¶
func (slice Float32Slice) Reverse() Float32Slice
Reverse will reverse the order of the slice
func (Float32Slice) SortAsc ¶
func (slice Float32Slice) SortAsc() Float32Slice
SortAsc will sort the slice in ascending order
func (Float32Slice) SortDesc ¶
func (slice Float32Slice) SortDesc() Float32Slice
SortDesc will sort the slice in descending order
func (Float32Slice) TryEach ¶ added in v0.0.4
func (slice Float32Slice) TryEach(f func(float32) error) (int, error)
TryEach will apply a function to each float32 in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
func (Float32Slice) Unique ¶
func (slice Float32Slice) Unique() Float32Slice
Unique filters out duplicate float32 values
func (Float32Slice) Value ¶
func (slice Float32Slice) Value() []float32
Value returns the aliased []float32
type Float64Slice ¶
type Float64Slice []float64
Float64Slice is the alias of []float64
func (Float64Slice) Chunk ¶ added in v0.0.5
func (slice Float64Slice) Chunk(size int) [][]float64
Chunk will divide the slice of float64 into smaller slices defined by chunk length
func (Float64Slice) Contains ¶
func (slice Float64Slice) Contains(needle float64) bool
Contains returns true if the slice contains needle
func (Float64Slice) Each ¶
func (slice Float64Slice) Each(f func(float64))
Each will apply a function to each float64 in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (Float64Slice) Filter ¶
func (slice Float64Slice) Filter(f func(float64) bool) Float64Slice
Filter will return all float64 values that evaluate true in the user-supplied function
func (Float64Slice) IfEach ¶ added in v0.0.4
func (slice Float64Slice) IfEach(f func(float64) bool) (int, bool)
IfEach will apply a function to each float64 in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (Float64Slice) IndexOf ¶
func (slice Float64Slice) IndexOf(needle float64) int
IndexOf returns the first index of needle, or -1 if not found
func (Float64Slice) Map ¶
func (slice Float64Slice) Map(f func(float64) float64)
Map will apply a function to each float64 in the slice and replace the previous value
func (Float64Slice) Reverse ¶
func (slice Float64Slice) Reverse() Float64Slice
Reverse will reverse the order of the slice
func (Float64Slice) SortAsc ¶
func (slice Float64Slice) SortAsc() Float64Slice
SortAsc will sort the slice in ascending order
func (Float64Slice) SortDesc ¶
func (slice Float64Slice) SortDesc() Float64Slice
SortDesc will sort the slice in descending order
func (Float64Slice) TryEach ¶ added in v0.0.4
func (slice Float64Slice) TryEach(f func(float64) error) (int, error)
TryEach will apply a function to each float64 in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
func (Float64Slice) Unique ¶
func (slice Float64Slice) Unique() Float64Slice
Unique filters out duplicate float64 values
func (Float64Slice) Value ¶
func (slice Float64Slice) Value() []float64
Value returns the aliased []float64
type Int16Slice ¶
type Int16Slice []int16
Int16Slice is the alias of []int16
func (Int16Slice) Chunk ¶ added in v0.0.5
func (slice Int16Slice) Chunk(size int) [][]int16
Chunk will divide the slice of int16 into smaller slices defined by chunk length
func (Int16Slice) Contains ¶
func (slice Int16Slice) Contains(needle int16) bool
Contains returns true if the slice contains needle
func (Int16Slice) Each ¶
func (slice Int16Slice) Each(f func(int16))
Each will apply a function to each int16 in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (Int16Slice) Filter ¶
func (slice Int16Slice) Filter(f func(int16) bool) Int16Slice
Filter will return all int16 values that evaluate true in the user-supplied function
func (Int16Slice) IfEach ¶ added in v0.0.4
func (slice Int16Slice) IfEach(f func(int16) bool) (int, bool)
IfEach will apply a function to each int16 in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (Int16Slice) IndexOf ¶
func (slice Int16Slice) IndexOf(needle int16) int
IndexOf returns the first index of needle, or -1 if not found
func (Int16Slice) Map ¶
func (slice Int16Slice) Map(f func(int16) int16)
Map will apply a function to each int16 in the slice and replace the previous value
func (Int16Slice) Reverse ¶
func (slice Int16Slice) Reverse() Int16Slice
Reverse will reverse the order of the slice
func (Int16Slice) SortAsc ¶
func (slice Int16Slice) SortAsc() Int16Slice
SortAsc will sort the slice in ascending order
func (Int16Slice) SortDesc ¶
func (slice Int16Slice) SortDesc() Int16Slice
SortDesc will sort the slice in descending order
func (Int16Slice) TryEach ¶ added in v0.0.4
func (slice Int16Slice) TryEach(f func(int16) error) (int, error)
TryEach will apply a function to each int16 in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
func (Int16Slice) Unique ¶
func (slice Int16Slice) Unique() Int16Slice
Unique filters out duplicate int16 values
type Int32Slice ¶
type Int32Slice []int32
Int32Slice is the alias of []int32
func (Int32Slice) Chunk ¶ added in v0.0.5
func (slice Int32Slice) Chunk(size int) [][]int32
Chunk will divide the slice of int32 into smaller slices defined by chunk length
func (Int32Slice) Contains ¶
func (slice Int32Slice) Contains(needle int32) bool
Contains returns true if the slice contains needle
func (Int32Slice) Each ¶
func (slice Int32Slice) Each(f func(int32))
Each will apply a function to each int32 in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (Int32Slice) Filter ¶
func (slice Int32Slice) Filter(f func(int32) bool) Int32Slice
Filter will return all int32 values that evaluate true in the user-supplied function
func (Int32Slice) IfEach ¶ added in v0.0.4
func (slice Int32Slice) IfEach(f func(int32) bool) (int, bool)
IfEach will apply a function to each int32 in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (Int32Slice) IndexOf ¶
func (slice Int32Slice) IndexOf(needle int32) int
IndexOf returns the first index of needle, or -1 if not found
func (Int32Slice) Map ¶
func (slice Int32Slice) Map(f func(int32) int32)
Map will apply a function to each int32 in the slice and replace the previous value
func (Int32Slice) Reverse ¶
func (slice Int32Slice) Reverse() Int32Slice
Reverse will reverse the order of the slice
func (Int32Slice) SortAsc ¶
func (slice Int32Slice) SortAsc() Int32Slice
SortAsc will sort the slice in ascending order
func (Int32Slice) SortDesc ¶
func (slice Int32Slice) SortDesc() Int32Slice
SortDesc will sort the slice in descending order
func (Int32Slice) TryEach ¶ added in v0.0.4
func (slice Int32Slice) TryEach(f func(int32) error) (int, error)
TryEach will apply a function to each int32 in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
func (Int32Slice) Unique ¶
func (slice Int32Slice) Unique() Int32Slice
Unique filters out duplicate int32 values
type Int64Slice ¶
type Int64Slice []int64
Int64Slice is the alias of []int64
func (Int64Slice) Chunk ¶ added in v0.0.5
func (slice Int64Slice) Chunk(size int) [][]int64
Chunk will divide the slice of int64 into smaller slices defined by chunk length
func (Int64Slice) Contains ¶
func (slice Int64Slice) Contains(needle int64) bool
Contains returns true if the slice contains needle
func (Int64Slice) Each ¶
func (slice Int64Slice) Each(f func(int64))
Each will apply a function to each int64 in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (Int64Slice) Filter ¶
func (slice Int64Slice) Filter(f func(int64) bool) Int64Slice
Filter will return all int64 values that evaluate true in the user-supplied function
func (Int64Slice) IfEach ¶ added in v0.0.4
func (slice Int64Slice) IfEach(f func(int64) bool) (int, bool)
IfEach will apply a function to each int64 in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (Int64Slice) IndexOf ¶
func (slice Int64Slice) IndexOf(needle int64) int
IndexOf returns the first index of needle, or -1 if not found
func (Int64Slice) Map ¶
func (slice Int64Slice) Map(f func(int64) int64)
Map will apply a function to each int64 in the slice and replace the previous value
func (Int64Slice) Reverse ¶
func (slice Int64Slice) Reverse() Int64Slice
Reverse will reverse the order of the slice
func (Int64Slice) SortAsc ¶
func (slice Int64Slice) SortAsc() Int64Slice
SortAsc will sort the slice in ascending order
func (Int64Slice) SortDesc ¶
func (slice Int64Slice) SortDesc() Int64Slice
SortDesc will sort the slice in descending order
func (Int64Slice) TryEach ¶ added in v0.0.4
func (slice Int64Slice) TryEach(f func(int64) error) (int, error)
TryEach will apply a function to each int64 in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
func (Int64Slice) Unique ¶
func (slice Int64Slice) Unique() Int64Slice
Unique filters out duplicate int64 values
type Int8Slice ¶
type Int8Slice []int8
Int8Slice is the alias of []int8
func (Int8Slice) Chunk ¶ added in v0.0.5
Chunk will divide the slice of int8 into smaller slices defined by chunk length
func (Int8Slice) Each ¶
Each will apply a function to each int8 in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (Int8Slice) Filter ¶
Filter will return all int8 values that evaluate true in the user-supplied function
func (Int8Slice) IfEach ¶ added in v0.0.4
IfEach will apply a function to each int8 in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (Int8Slice) Map ¶
Map will apply a function to each int8 in the slice and replace the previous value
func (Int8Slice) TryEach ¶ added in v0.0.4
TryEach will apply a function to each int8 in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
type IntSlice ¶
type IntSlice []int
IntSlice is the alias of []int
func (IntSlice) Chunk ¶ added in v0.0.5
Chunk will divide the slice of int into smaller slices defined by chunk length
func (IntSlice) Each ¶
Each will apply a function to each int in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (IntSlice) Filter ¶
Filter will return all int values that evaluate true in the user-supplied function
func (IntSlice) IfEach ¶ added in v0.0.4
IfEach will apply a function to each int in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (IntSlice) Map ¶
Map will apply a function to each int in the slice and replace the previous value
func (IntSlice) TryEach ¶ added in v0.0.4
TryEach will apply a function to each int in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
type StringSlice ¶
type StringSlice []string
StringSlice is the alias of []string
func (StringSlice) Chunk ¶ added in v0.0.5
func (slice StringSlice) Chunk(size int) [][]string
Chunk will divide the slice of string into smaller slices defined by chunk length
func (StringSlice) Contains ¶
func (slice StringSlice) Contains(needle string) bool
Contains returns true if the slice contains needle
func (StringSlice) Each ¶
func (slice StringSlice) Each(f func(string))
Each will apply a function to each string in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (StringSlice) Filter ¶
func (slice StringSlice) Filter(f func(string) bool) StringSlice
Filter will return all string values that evaluate true in the user-supplied function
func (StringSlice) IfEach ¶ added in v0.0.4
func (slice StringSlice) IfEach(f func(string) bool) (int, bool)
IfEach will apply a function to each string in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (StringSlice) IndexOf ¶
func (slice StringSlice) IndexOf(needle string) int
IndexOf returns the first index of needle, or -1 if not found
func (StringSlice) Map ¶
func (slice StringSlice) Map(f func(string) string)
Map will apply a function to each string in the slice and replace the previous value
func (StringSlice) Reverse ¶
func (slice StringSlice) Reverse() StringSlice
Reverse will reverse the order of the slice
func (StringSlice) SortAsc ¶
func (slice StringSlice) SortAsc() StringSlice
SortAsc will sort the slice in ascending order
func (StringSlice) SortDesc ¶
func (slice StringSlice) SortDesc() StringSlice
SortDesc will sort the slice in descending order
func (StringSlice) TryEach ¶ added in v0.0.4
func (slice StringSlice) TryEach(f func(string) error) (int, error)
TryEach will apply a function to each string in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
func (StringSlice) Unique ¶
func (slice StringSlice) Unique() StringSlice
Unique filters out duplicate string values
func (StringSlice) Value ¶
func (slice StringSlice) Value() []string
Value returns the aliased []string
type UInt16Slice ¶
type UInt16Slice []uint16
UInt16Slice is the alias of []uint16
func (UInt16Slice) Chunk ¶ added in v0.0.5
func (slice UInt16Slice) Chunk(size int) [][]uint16
Chunk will divide the slice of uint16 into smaller slices defined by chunk length
func (UInt16Slice) Contains ¶
func (slice UInt16Slice) Contains(needle uint16) bool
Contains returns true if the slice contains needle
func (UInt16Slice) Each ¶
func (slice UInt16Slice) Each(f func(uint16))
Each will apply a function to each uint16 in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (UInt16Slice) Filter ¶
func (slice UInt16Slice) Filter(f func(uint16) bool) UInt16Slice
Filter will return all uint16 values that evaluate true in the user-supplied function
func (UInt16Slice) IfEach ¶ added in v0.0.4
func (slice UInt16Slice) IfEach(f func(uint16) bool) (int, bool)
IfEach will apply a function to each uint16 in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (UInt16Slice) IndexOf ¶
func (slice UInt16Slice) IndexOf(needle uint16) int
IndexOf returns the first index of needle, or -1 if not found
func (UInt16Slice) Map ¶
func (slice UInt16Slice) Map(f func(uint16) uint16)
Map will apply a function to each uint16 in the slice and replace the previous value
func (UInt16Slice) Reverse ¶
func (slice UInt16Slice) Reverse() UInt16Slice
Reverse will reverse the order of the slice
func (UInt16Slice) SortAsc ¶
func (slice UInt16Slice) SortAsc() UInt16Slice
SortAsc will sort the slice in ascending order
func (UInt16Slice) SortDesc ¶
func (slice UInt16Slice) SortDesc() UInt16Slice
SortDesc will sort the slice in descending order
func (UInt16Slice) TryEach ¶ added in v0.0.4
func (slice UInt16Slice) TryEach(f func(uint16) error) (int, error)
TryEach will apply a function to each uint16 in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
func (UInt16Slice) Unique ¶
func (slice UInt16Slice) Unique() UInt16Slice
Unique filters out duplicate uint16 values
func (UInt16Slice) Value ¶
func (slice UInt16Slice) Value() []uint16
Value returns the aliased []uint16
type UInt32Slice ¶
type UInt32Slice []uint32
UInt32Slice is the alias of []uint32
func (UInt32Slice) Chunk ¶ added in v0.0.5
func (slice UInt32Slice) Chunk(size int) [][]uint32
Chunk will divide the slice of uint32 into smaller slices defined by chunk length
func (UInt32Slice) Contains ¶
func (slice UInt32Slice) Contains(needle uint32) bool
Contains returns true if the slice contains needle
func (UInt32Slice) Each ¶
func (slice UInt32Slice) Each(f func(uint32))
Each will apply a function to each uint32 in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (UInt32Slice) Filter ¶
func (slice UInt32Slice) Filter(f func(uint32) bool) UInt32Slice
Filter will return all uint32 values that evaluate true in the user-supplied function
func (UInt32Slice) IfEach ¶ added in v0.0.4
func (slice UInt32Slice) IfEach(f func(uint32) bool) (int, bool)
IfEach will apply a function to each uint32 in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (UInt32Slice) IndexOf ¶
func (slice UInt32Slice) IndexOf(needle uint32) int
IndexOf returns the first index of needle, or -1 if not found
func (UInt32Slice) Map ¶
func (slice UInt32Slice) Map(f func(uint32) uint32)
Map will apply a function to each uint32 in the slice and replace the previous value
func (UInt32Slice) Reverse ¶
func (slice UInt32Slice) Reverse() UInt32Slice
Reverse will reverse the order of the slice
func (UInt32Slice) SortAsc ¶
func (slice UInt32Slice) SortAsc() UInt32Slice
SortAsc will sort the slice in ascending order
func (UInt32Slice) SortDesc ¶
func (slice UInt32Slice) SortDesc() UInt32Slice
SortDesc will sort the slice in descending order
func (UInt32Slice) TryEach ¶ added in v0.0.4
func (slice UInt32Slice) TryEach(f func(uint32) error) (int, error)
TryEach will apply a function to each uint32 in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
func (UInt32Slice) Unique ¶
func (slice UInt32Slice) Unique() UInt32Slice
Unique filters out duplicate uint32 values
func (UInt32Slice) Value ¶
func (slice UInt32Slice) Value() []uint32
Value returns the aliased []uint32
type UInt64Slice ¶
type UInt64Slice []uint64
UInt64Slice is the alias of []uint64
func (UInt64Slice) Chunk ¶ added in v0.0.5
func (slice UInt64Slice) Chunk(size int) [][]uint64
Chunk will divide the slice of uint64 into smaller slices defined by chunk length
func (UInt64Slice) Contains ¶
func (slice UInt64Slice) Contains(needle uint64) bool
Contains returns true if the slice contains needle
func (UInt64Slice) Each ¶
func (slice UInt64Slice) Each(f func(uint64))
Each will apply a function to each uint64 in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (UInt64Slice) Filter ¶
func (slice UInt64Slice) Filter(f func(uint64) bool) UInt64Slice
Filter will return all uint64 values that evaluate true in the user-supplied function
func (UInt64Slice) IfEach ¶ added in v0.0.4
func (slice UInt64Slice) IfEach(f func(uint64) bool) (int, bool)
IfEach will apply a function to each uint64 in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (UInt64Slice) IndexOf ¶
func (slice UInt64Slice) IndexOf(needle uint64) int
IndexOf returns the first index of needle, or -1 if not found
func (UInt64Slice) Map ¶
func (slice UInt64Slice) Map(f func(uint64) uint64)
Map will apply a function to each uint64 in the slice and replace the previous value
func (UInt64Slice) Reverse ¶
func (slice UInt64Slice) Reverse() UInt64Slice
Reverse will reverse the order of the slice
func (UInt64Slice) SortAsc ¶
func (slice UInt64Slice) SortAsc() UInt64Slice
SortAsc will sort the slice in ascending order
func (UInt64Slice) SortDesc ¶
func (slice UInt64Slice) SortDesc() UInt64Slice
SortDesc will sort the slice in descending order
func (UInt64Slice) TryEach ¶ added in v0.0.4
func (slice UInt64Slice) TryEach(f func(uint64) error) (int, error)
TryEach will apply a function to each uint64 in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
func (UInt64Slice) Unique ¶
func (slice UInt64Slice) Unique() UInt64Slice
Unique filters out duplicate uint64 values
func (UInt64Slice) Value ¶
func (slice UInt64Slice) Value() []uint64
Value returns the aliased []uint64
type UInt8Slice ¶
type UInt8Slice []uint8
UInt8Slice is the alias of []uint8
func (UInt8Slice) Chunk ¶ added in v0.0.5
func (slice UInt8Slice) Chunk(size int) [][]uint8
Chunk will divide the slice of uint8 into smaller slices defined by chunk length
func (UInt8Slice) Contains ¶
func (slice UInt8Slice) Contains(needle uint8) bool
Contains returns true if the slice contains needle
func (UInt8Slice) Each ¶
func (slice UInt8Slice) Each(f func(uint8))
Each will apply a function to each uint8 in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (UInt8Slice) Filter ¶
func (slice UInt8Slice) Filter(f func(uint8) bool) UInt8Slice
Filter will return all uint8 values that evaluate true in the user-supplied function
func (UInt8Slice) IfEach ¶ added in v0.0.4
func (slice UInt8Slice) IfEach(f func(uint8) bool) (int, bool)
IfEach will apply a function to each uint8 in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (UInt8Slice) IndexOf ¶
func (slice UInt8Slice) IndexOf(needle uint8) int
IndexOf returns the first index of needle, or -1 if not found
func (UInt8Slice) Map ¶
func (slice UInt8Slice) Map(f func(uint8) uint8)
Map will apply a function to each uint8 in the slice and replace the previous value
func (UInt8Slice) Reverse ¶
func (slice UInt8Slice) Reverse() UInt8Slice
Reverse will reverse the order of the slice
func (UInt8Slice) SortAsc ¶
func (slice UInt8Slice) SortAsc() UInt8Slice
SortAsc will sort the slice in ascending order
func (UInt8Slice) SortDesc ¶
func (slice UInt8Slice) SortDesc() UInt8Slice
SortDesc will sort the slice in descending order
func (UInt8Slice) TryEach ¶ added in v0.0.4
func (slice UInt8Slice) TryEach(f func(uint8) error) (int, error)
TryEach will apply a function to each uint8 in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
func (UInt8Slice) Unique ¶
func (slice UInt8Slice) Unique() UInt8Slice
Unique filters out duplicate uint8 values
type UIntPtrSlice ¶
type UIntPtrSlice []uintptr
UIntPtrSlice is the alias of []uintptr
func (UIntPtrSlice) Chunk ¶ added in v0.0.5
func (slice UIntPtrSlice) Chunk(size int) [][]uintptr
Chunk will divide the slice of uintptr into smaller slices defined by chunk length
func (UIntPtrSlice) Contains ¶
func (slice UIntPtrSlice) Contains(needle uintptr) bool
Contains returns true if the slice contains needle
func (UIntPtrSlice) Each ¶
func (slice UIntPtrSlice) Each(f func(uintptr))
Each will apply a function to each uintptr in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (UIntPtrSlice) Filter ¶
func (slice UIntPtrSlice) Filter(f func(uintptr) bool) UIntPtrSlice
Filter will return all uintptr values that evaluate true in the user-supplied function
func (UIntPtrSlice) IfEach ¶ added in v0.0.4
func (slice UIntPtrSlice) IfEach(f func(uintptr) bool) (int, bool)
IfEach will apply a function to each uintptr in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (UIntPtrSlice) IndexOf ¶
func (slice UIntPtrSlice) IndexOf(needle uintptr) int
IndexOf returns the first index of needle, or -1 if not found
func (UIntPtrSlice) Map ¶
func (slice UIntPtrSlice) Map(f func(uintptr) uintptr)
Map will apply a function to each uintptr in the slice and replace the previous value
func (UIntPtrSlice) Reverse ¶
func (slice UIntPtrSlice) Reverse() UIntPtrSlice
Reverse will reverse the order of the slice
func (UIntPtrSlice) SortAsc ¶
func (slice UIntPtrSlice) SortAsc() UIntPtrSlice
SortAsc will sort the slice in ascending order
func (UIntPtrSlice) SortDesc ¶
func (slice UIntPtrSlice) SortDesc() UIntPtrSlice
SortDesc will sort the slice in descending order
func (UIntPtrSlice) TryEach ¶ added in v0.0.4
func (slice UIntPtrSlice) TryEach(f func(uintptr) error) (int, error)
TryEach will apply a function to each uintptr in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.
func (UIntPtrSlice) Unique ¶
func (slice UIntPtrSlice) Unique() UIntPtrSlice
Unique filters out duplicate uintptr values
func (UIntPtrSlice) Value ¶
func (slice UIntPtrSlice) Value() []uintptr
Value returns the aliased []uintptr
type UIntSlice ¶
type UIntSlice []uint
UIntSlice is the alias of []uint
func (UIntSlice) Chunk ¶ added in v0.0.5
Chunk will divide the slice of uint into smaller slices defined by chunk length
func (UIntSlice) Each ¶
Each will apply a function to each uint in the slice. This function will iterate over the slice completely. No items in the slice should be mutated by this operation.
func (UIntSlice) Filter ¶
Filter will return all uint values that evaluate true in the user-supplied function
func (UIntSlice) IfEach ¶ added in v0.0.4
IfEach will apply a function to each uint in the slice. If the function returns false, the iteration will stop and return the index of the element that caused the function to return false. The second returned value will be true if all members of the slice cause the provided function to return true, and false otherwise. No items in the slice should be mutated by this operation.
func (UIntSlice) Map ¶
Map will apply a function to each uint in the slice and replace the previous value
func (UIntSlice) TryEach ¶ added in v0.0.4
TryEach will apply a function to each uint in the slice. If the function returns an error, the iteration will stop and return the index of the element that caused the function to return the error. The second returned value will be first error returned from the supplied function, and nil otherwise. No items in the slice should be mutated by this operation.