Documentation
¶
Index ¶
- Variables
- func ContainsAll[T comparable](a, b []T) bool
- func EmptyIfNil[T any](s []T) []T
- func MergeRenderedPodLabels(podLabels, tmpl, vars map[string]string) error
- func ParseEnv(envVariable string) (string, error)
- func PtrIsNonZero(ptr *int32) bool
- func RenderPodLabels(tmpl, vars map[string]string) (map[string]string, error)
- func SortItems[T any](items []T, sortBy SortBy, order SortOrder, nameFn func(T) string, ...)
- func SplitAndTrimString(s, sep string) []string
- type SortBy
- type SortOrder
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEnvVarNotDefined = errors.New("environment variable not defined")
Functions ¶
func ContainsAll ¶
func ContainsAll[T comparable](a, b []T) bool
ContainsAll returns true if a contains all elements of b.
func EmptyIfNil ¶
func EmptyIfNil[T any](s []T) []T
EmptyIfNil returns an empty slice if the input is nil.
func MergeRenderedPodLabels ¶ added in v0.4.0
func PtrIsNonZero ¶
func RenderPodLabels ¶ added in v0.4.0
func SortItems ¶
func SortItems[T any](items []T, sortBy SortBy, order SortOrder, nameFn func(T) string, dateFns ...func(T) time.Time)
SortItems sorts a slice in-place by name or date fields using accessor functions.
func SplitAndTrimString ¶
SplitAndTrimString returns a new slice from a string separated by the given separator with all empty entries removed.
Types ¶
Click to show internal directories.
Click to hide internal directories.