utils

package
v1.19.7 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](slice []T, elem T) bool

Contains checks if slice contains element

func Filter

func Filter[T any](slice []T, predicate func(T) bool) []T

Filter filters a slice

func Sort

func Sort[T any](slice []T, less func(i, j int) bool)

Sort sorts a slice

func SortByID

func SortByID[T interface{ ID() string }](slice []T)

SortByID sorts by ID

Types

This section is empty.

Directories

Path Synopsis
timer

Jump to

Keyboard shortcuts

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