filter

package
v0.0.0-...-a75e731 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterGeneric

func FilterGeneric[T any](s []T, f func(T) bool) []T

FilterGeneric filters values from a slice using a filter function. It returns a new slice with only the elements of s for which f returned true.

func FilterInt

func FilterInt(s []int, f func(int) bool) []int

func FilterReflection

func FilterReflection(slice interface{}, filter interface{}) interface{}

func FilterString

func FilterString(s []string, f func(string) bool) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL