Documentation
¶
Index ¶
- func Contains[T comparable](items []T, element T) bool
- func DocList(items []string) string
- func Filter[T any](items []T, ok func(item T) bool) []T
- func MakeLookupMap[T comparable](items []T) map[T]bool
- func MakeStringSet(values []string) types.Set
- func Map[T, R any](items []T, f func(item T) R) []R
- func MapKeys[T comparable](lookup map[T]bool) []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](items []T, element T) bool
Contains - checks if element exists in the slice.
func Filter ¶
Filter - filter down the elements from the given array that pass the test implemented by the provided function.
func MakeLookupMap ¶
func MakeLookupMap[T comparable](items []T) map[T]bool
MakeLookupMap - creates lookup map from slice.
func MakeStringSet ¶ added in v3.0.13
func Map ¶
func Map[T, R any](items []T, f func(item T) R) []R
Map - transform giving slice of items by applying the func.
func MapKeys ¶
func MapKeys[T comparable](lookup map[T]bool) []T
MapKeys - collects map keys to slice.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.