Documentation ¶
Index ¶
- Variables
- func Contains[T comparable](data []T, e T) bool
- func Copy[T any](data []T) (r []T)
- func Filter[P any](data []P, fn func(P) bool) (r []P)
- func Find[T any](data []T, fn func(T) bool) (r T, err error)
- func Map[P any, R any](data []P, fn func(P) R) (r []R)
- func Safe[T any](data []T, index int) (val T)
- func ToAny[T any](list []T) (r []any)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func Contains ¶
func Contains[T comparable](data []T, e T) bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.