util

package
v0.0.0-...-3be3c9f Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOutOfBound error = errors.New("out of bound")

Functions

func ComposeCtx

func ComposeCtx[T, U, V any](
	f func(context.Context, T) (U, error),
	g func(context.Context, U) (V, error),
) func(context.Context, T) (V, error)

func ComposeErr

func ComposeErr[T, U, V any](f func(T) (U, error), g func(U) (V, error)) func(T) (V, error)

func CurryIII

func CurryIII[T, U, V, W any](f func(T, U, V) W) func(T) func(U) func(V) W

func NoErr

func NoErr[I, O any](original func(I) O) func(context.Context, I) (O, error)

func Select

func Select[T any](ng T, ok T, cond bool) T

Types

type Array

type Array[T any] []T

func (Array[T]) First

func (a Array[T]) First() (t T, e error)

Jump to

Keyboard shortcuts

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