util

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareMapsIgnoringNulls added in v0.4.0

func CompareMapsIgnoringNulls(a map[string]any, b map[string]any) bool

CompareMapsIgnoringNulls compares 2 maps for equality, ignoring any null values, empty maps, empty arrays, zero numerical values, and empty strings

func NewWorkQueue added in v0.2.0

func NewWorkQueue(queueName string) workqueue.RateLimitingInterface

func SplitMap added in v0.6.0

func SplitMap(m map[string]any, paths []string, pathSeparator string) (onlyPaths map[string]any, withoutPaths map[string]any, err error)

SplitMap returns 2 maps from a given map and a slice of paths. One of the 2 output maps will include only the paths from the slice while the second returned map will include all other paths.

func SplitObject added in v0.6.0

func SplitObject(obj []byte, paths []string, pathSeparator string) (map[string]any, map[string]any, error)

SplitObject returns 2 maps from a given object as bytes array and a slice of paths. One of the 2 output maps will include only the paths from the slice while the second returned map will include all other paths.

func StructToStruct added in v0.2.0

func StructToStruct(src any, dst any) error

StructToStruct converts a struct type (src) into another (dst)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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