Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("entity not found") ErrEmptyList = errors.New("list is empty") )
Functions ¶
func MaxByField ¶ added in v1.2.0
func MaxByField[A any, B constraints.Ordered](l List[A], get func(a A) B) (A, error)
func MinByField ¶ added in v1.2.0
func MinByField[A any, B constraints.Ordered](l List[A], get func(a A) B) (A, error)
Types ¶
type List ¶
type List[A any] []A
func OrderByAsc ¶ added in v1.2.0
func OrderByAsc[A any, B constraints.Ordered](l List[A], get func(a A) B) List[A]
func OrderByDesc ¶ added in v1.2.0
func OrderByDesc[A any, B constraints.Ordered](l List[A], get func(a A) B) List[A]
func (*List[A]) FirstOrDefault ¶
Click to show internal directories.
Click to hide internal directories.