package
Version:
v0.10.0
Opens a new window with list of versions in this module.
Published: Jul 11, 2024
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package filter provides a generic way to filter a slice of items.
type Filter[T any] struct {
}
The Filter contains the slice of items to filter.
NewFilter creates a new filter with the given type and item slice.
func (f *Filter[T]) Filter(filters ...func(T) bool) *[]T
Filter executes the filter operation with the given filters functions.
Returns a slice of the matching items.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.