generic

package
v0.0.0-...-92ca402 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Arg1

func Arg1[T string | objectid.ID](str string, one []T) []string

func Arg2

func Arg2[T string | objectid.ID](str string, one []T, two []T) []string

func Difference

func Difference[T comparable](a []T, b []T) []T

Difference returns the symmetric difference of the given slices.

func Duplicate

func Duplicate[T comparable](lis []T) bool

Duplicate expresses whether the given list contains duplicated items.

func For

func For[T string | objectid.ID](max int, fnc func(int) T) []T

func Func

func Func[T string | objectid.ID | objectlabel.DesiredLifecycle](lis []T, fnc func(T) string) []string

func Select

func Select[T comparable](all []T, sub []T) []T

Select returns the subset of elements that are not present in all.

func Unique

func Unique[T comparable](lis []T) []T

Unique returns the distinct items of the given list without preserving any particular input order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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