utils

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DedupStrings

func DedupStrings(src []string) []string

DedupStrings deduplicate string list, empty items are dropped

func EqualStringSlice

func EqualStringSlice(l1, l2 []string) bool

EqualStringSlice compare two string slices if they have equal values independent of how they are sorted

func Paginate

func Paginate[T any](get func(page int) ([]T, error)) ([]T, error)

Paginate iterates over a func call until it does not return new items and return it as list

func WithContextSigtermCallback

func WithContextSigtermCallback(ctx context.Context, f func()) context.Context

Returns a copy of parent context that is canceled when an os interrupt signal is received.

Types

This section is empty.

Jump to

Keyboard shortcuts

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