sliceutil

package
v2.29.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Anonymize

func Anonymize[T any](src []T) []interface{}

Anonymize casts slice to slice of interfaces

func Exhaust added in v2.29.0

func Exhaust[T any](f func(limitOffset qb.LimitOffset) ([]T, int, error)) ([]T, error)

Exhaust all calls to flatten using the passed iterator function, note that this will exit after the first error encountered and not return any results.

func Flatten added in v2.27.2

func Flatten[T any](limitOffset qb.LimitOffset, source func(limitOffset qb.LimitOffset) ([]T, int, error)) iter.Seq2[T, error]

Flatten is a utility function for flattening a loop that ranges over an array of an array of items returned from a function. Useful in paging queries.

func ToStringSlice added in v2.9.0

func ToStringSlice[T ~string](src []T) []string

ToStringSlice casts slice of string type aliases to slice of string type

Types

This section is empty.

Jump to

Keyboard shortcuts

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