typeutils

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeEnvVar

func ComputeEnvVar(prefix, format string, keys ...string) string

func CreateMap

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

func Env

func Env(key, value string) corev1.EnvVar

func EnvFrom

func EnvFrom(key string, value *corev1.EnvVarSource) corev1.EnvVar

func EnvFromWithPrefix

func EnvFromWithPrefix(prefix, key string, value *corev1.EnvVarSource) corev1.EnvVar

func EnvVarPlaceholder

func EnvVarPlaceholder(key, prefix string) string

func EnvWithPrefix

func EnvWithPrefix(prefix, key, value string) corev1.EnvVar

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