util

package
v0.0.0-...-5b87a2c Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DereferenceList

func DereferenceList[T any](ptrlist []*T) []T

func Filter

func Filter[I any](in []I, f func(I) bool) []I

func FilterEmpty

func FilterEmpty(in []string) []string

TODO: what other generic things can we apply? is there lennable?

func FlatMap

func FlatMap[I, O any](in []I, f func(I) []O) []O

func FlatMapWithError

func FlatMapWithError[I, O any](in []I, f func(I) ([]O, error)) ([]O, error)

func Has

func Has[I any](in []I, f func(I) bool) bool

func Map

func Map[I, O any](in []I, f func(I) O) []O

func MapNonNil

func MapNonNil[I, O any](in []I, f func(I) *O) []O

func MatchOne

func MatchOne[I any](in []I, f func(I) bool) (*I, error)

func Must

func Must[T any](t T, err error) T

func PanicIfError

func PanicIfError(err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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