slice

package
v0.0.0-...-acb99ff Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distinct

func Distinct[T any](src []T, keySelector func(item T) any) []T

Distinct returns a distinct list of objects based the value returned by keySelector

func First

func First[T any](src []T, predicates ...PredicateFunc[T]) (first T, found bool)

func Map

func Map[TIn, TOut any](src []TIn, mapper func(obj TIn) TOut) []TOut

func OrderBy

func OrderBy[T any](source []T, compare CompareFunc[T]) []T

Types

type CompareFunc

type CompareFunc[T any] func(first, second T) bool

type PredicateFunc

type PredicateFunc[T any] func(obj T) bool

Jump to

Keyboard shortcuts

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