Documentation ¶
Index ¶
- func Contains[T any](array []T, cmp func(v T) bool) bool
- func ContainsItem[T comparable](slice []T, item T) bool
- func ConvertSlice[To, From any](slice []From, convert func(From) To) []To
- func ConvertToSlice[To, From any](convert func(From) To, objs ...From) []To
- func Filter[T any](array []T, filterFunc func(T) bool) []T
- func FilterOut[T any](array []T, filterOutFunc func(T) bool) []T
- func FilterOutNil[T any](array []*T) []*T
- func Find[T any](slice []T, filterFunc func(T) bool) (T, int, bool)
- func FindItem[T comparable](slice []T, item T) (T, int, bool)
- func Flatten[T any](xs [][]T) []T
- func IdentityFunc[T comparable](item T) func(T) bool
- func ToSlice[T any](objs ...T) []T
- func ToString[T ~string](v T) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsItem ¶
func ContainsItem[T comparable](slice []T, item T) bool
func ConvertSlice ¶
func ConvertSlice[To, From any](slice []From, convert func(From) To) []To
func ConvertToSlice ¶
func ConvertToSlice[To, From any](convert func(From) To, objs ...From) []To
func FilterOutNil ¶
func FilterOutNil[T any](array []*T) []*T
func FindItem ¶
func FindItem[T comparable](slice []T, item T) (T, int, bool)
func IdentityFunc ¶
func IdentityFunc[T comparable](item T) func(T) bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.