Documentation ¶
Index ¶
- func Contains[T any](slice []T, predicate func(T) bool) bool
- func ContainsString(slice []string, s string) bool
- func Filter[T any](slice []T, predicate func(T) bool) []T
- func Find[T any](slice []T, predicate func(T) bool) (element T, ok bool)
- func Map[T, R any](slice []T, f func(T) R) []R
- func MapErr[T, R any](slice []T, f func(T) (R, error)) ([]R, error)
- func RemoveString(slice []string, s string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
ContainsString checks if a given slice of strings contains the provided string.
func Find ¶
Find checks if an element in slice satisfies the given predicate, and returns it. If no element is found returns false
func RemoveString ¶
RemoveString returns a newly created []string that contains all items from slice that are not equal to s.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.