structutils

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DereferenceList

func DereferenceList[T any](items []*T) []T

Convert a referenced list to a list.

func GetBoolFromAnnotations

func GetBoolFromAnnotations(annotations map[string]string, key string) (bool, error)

GetBoolFromAnnotations returns the value of annotation. Returns false if not set or the value is invalid.

func GetNumberFromAnnotations

func GetNumberFromAnnotations(annotations map[string]string, key string) (int32, error)

GetNumberFromAnnotations returns the integer value of annotation. Returns 0 if not set or the value is invalid.

func GetTimeFromAnnotations

func GetTimeFromAnnotations(annotations map[string]string, key string) (time.Time, error)

GetTimeFromAnnotations returns the integer value of annotation. Returns unit Time if not set or the value is invalid.

func Keys

func Keys[K comparable, V any](items map[K]V) []K

Get keys from map

func MergeList

func MergeList[T any](items ...[]T) []T

MergeList concatenates all lists.

func MergeMaps

func MergeMaps(mapList ...map[string]string) map[string]string

func ReferenceList

func ReferenceList[T any](items []T) []*T

Convert a list to a referenced list.

func Values

func Values[K comparable, V any](items map[K]V) []V

Get values from map

Types

This section is empty.

Jump to

Keyboard shortcuts

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