slice

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: AGPL-3.0, AGPL-3.0-only Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All added in v0.23.8

func All[T any, F func(item T) bool](in []T, fn F) bool

func Any added in v0.23.8

func Any[T any, F func(item T) bool](in []T, fn F) bool

func Contain added in v0.23.8

func Contain[T comparable](s []T, item T) bool

func First added in v0.21.4

func First[T any](in []T, end int) []T

func Flat added in v0.23.7

func Flat[T any](in [][]T) []T

func Map

func Map[T any, K any, F func(item T) K](in []T, fn F) []K

func MapFilter

func MapFilter[T any, K any, F func(item T) (k K, ok bool)](in []T, fn F) []K

func ToMap added in v0.22.0

func ToMap[K comparable, T any, F func(item T) K](in []T, fn F) map[K]T

func ToUint8 added in v0.22.0

func ToUint8[T interface{ ~uint8 }](in []T) []uint8

func ToValuer added in v0.21.5

func ToValuer[T driver.Valuer](in []T) []driver.Valuer

func UniqueUnsorted added in v0.23.2

func UniqueUnsorted[T comparable](in []T) []T

Types

This section is empty.

Jump to

Keyboard shortcuts

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