functions

package
v0.0.0-...-16b3867 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeDuplicate

func DeDuplicate[T comparable, R any](fn func(T) R) func(T) R

DeDuplicate creates a deduplicated version of the given function.

- fn: The function to deduplicate.

Returns a new function that behaves as a deduplicated version of `fn`.

func Debounce

func Debounce[T any, R any](fn func(T) R, duration time.Duration) func(T) R

Debounce creates a debounced version of the given function.

- fn: The function to debounce. - duration: The debounce duration.

Returns a new function that behaves as a debounced version of `fn`.

func FirstNonEmpty deprecated

func FirstNonEmpty(data ...string) string

Deprecated: use strings.FirstNonEmpty instead

func InsteadOfNil

func InsteadOfNil[T any](a *T, b *T) *T

Types

type ClosingProvider

type ClosingProvider[t any] interface {
	Close() error
}

type Provider

type Provider[T any] func() T

Directories

Path Synopsis
Package must provides utility functions for handling errors and type conversions with panic behavior
Package must provides utility functions for handling errors and type conversions with panic behavior

Jump to

Keyboard shortcuts

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