Documentation ¶
Index ¶
- func All[T any, F func(item T) bool](in []T, fn F) bool
- func Any[T any, F func(item T) bool](in []T, fn F) bool
- func Clone[S ~[]E, E any](s S) S
- func Contain[T comparable](s []T, item T) bool
- func First[S ~[]T, T any](s S, end int) S
- func Flat[T any](in [][]T) []T
- func Map[T any, K any, F func(item T) K](in []T, fn F) []K
- func MapFilter[T any, K any, F func(item T) (k K, ok bool)](in []T, fn F) []K
- func ToMap[K comparable, T any, F func(item T) K](in []T, fn F) map[K]T
- func ToUint8[S ~[]T, T ~uint8](s S) []uint8
- func ToValuer[S ~[]T, T driver.Valuer](s S) []driver.Valuer
- func Unique[S ~[]T, T comparable](s S) S
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contain ¶ added in v0.23.8
func Contain[T comparable](s []T, item T) bool
func ToMap ¶ added in v0.22.0
func ToMap[K comparable, T any, F func(item T) K](in []T, fn F) map[K]T
func Unique ¶ added in v0.22.1
func Unique[S ~[]T, T comparable](s S) S
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.