typeutils

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMap

func CreateMap(args ...string) map[string]string

func Equal

func Equal[T comparable](value T) func(t T) bool

func Filter

func Filter[T any](items []T, checkFn func(t T) bool) []T

func First

func First[T any](items []T, checkFn func(t T) bool) *T

func Map

func Map[T1 any, T2 any](v1 []T1, transformer func(T1) T2) []T2

func MapObject

func MapObject(src, dst any)

func MergeAll

func MergeAll[T comparable](arrays ...[]T) []T

func MergeMaps

func MergeMaps[K comparable, V any](maps ...map[K]V) map[K]V

func NotEqual

func NotEqual[T comparable](value T) func(t T) bool

func NotIn

func NotIn[T comparable](items ...T) func(t T) bool

func SliceFromMap

func SliceFromMap[K comparable, V any](m map[K]V) []V

Types

type Array

type Array[T any] []T

+kubebuilder:object:generate=false

func (*Array[T]) Append

func (f *Array[T]) Append(t T)

func (Array[T]) Filter

func (f Array[T]) Filter(checkFn func(t T) bool) []T

func (Array[T]) First

func (f Array[T]) First(checkFn func(t T) bool) *T

Jump to

Keyboard shortcuts

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