utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distinct

func Distinct[T comparable](src []T) []T

func GoRecover

func GoRecover(ctx context.Context, fn func(ctx context.Context))

func Recover

func Recover(ctx context.Context)

func SliceToStrings

func SliceToStrings[T any](items []T) []string

func SortedDifference

func SortedDifference[T constraints.Ordered](base, exclude []T) []T

func TimeoutNoDeadline

func TimeoutNoDeadline(parent context.Context, d time.Duration) (context.Context, context.CancelFunc)

TimeoutNoDeadline прячем дедлайн с помощью noDeadlineCtx, чтобы драйвер не добавлял SET max_execution_time

func WaitOrCtx

func WaitOrCtx(ctx context.Context, wait time.Duration) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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