Documentation ¶
Index ¶
- func Chunk[T interface{}](total int, preferred []T) [][]T
- func ChunkFor[T interface{}](items []T, itemsAmount int) [][]T
- func Find[T any](opts FindOpts[T]) []T
- func FindOne[T any](opts FindOpts[T]) T
- func GetCrossOfSlices[T any](s1, s2 []T, compare func(T, T) bool) []T
- func Includes[...](values []T, v T) bool
- func Merge[T any](in ...[]T) []T
- func Paginate[T any](in []T, offset int, limit int) []T
- func Pop[T any](in []T, index int) []T
- func RandomValueOfSlice[T any](randSrc func(float64) (float64, error), in []T) (T, error)
- func RandomValueOfSliceNorm[T any](meanIndex float64, in []T) (T, error)
- func RandomValuesOfSlice[T any](randSrc func(float64) (float64, error), in []T, amount int) ([]T, error)
- func Shuffle[T any](in []T) []T
- func SliceToAnySlice[T any](in []T) []any
- func Unique[...](sl []T) []T
- type FindOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCrossOfSlices ¶
func RandomValueOfSlice ¶
func RandomValueOfSliceNorm ¶
func RandomValuesOfSlice ¶
func SliceToAnySlice ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.